I've got a project here with 16,500 files in it (75,000 if you count the subversion metadata). It's a Joomla 1.5 website with a bunch of content. I have three copies of the site in the project directory because of the way I'm merging changes from the latest Joomla SVN into my own source tree.
Needless to say switching to and from TextMate causes a considerable delay - between 5 and 10 seconds on my G4 PowerBook. I like to flip back and forth between a web browser, terminal and TM pretty frequently - at times as much as maybe a few times a minute - so I'm spending a fair proportion of my time waiting for TM at the moment.
Does anyone have any tips for speeding up TM's project scanning? Obviously I could rearrange my project to move some of the less frequently used files into another project - but I'd rather not do that if it's avoidable.
It seems that TM only really needs to rescan the directories that are open in the project drawer and any open files - a full scan could be then be done lazily if at all. I get the impression it currently walks the whole directory tree - is that correct? If it's not doing that what's taking so long?
On Nov 16, 2006, at 5:55 PM, Andy Armstrong wrote:
I've got a project here with 16,500 files in it (75,000 if you count the subversion metadata). It's a Joomla 1.5 website with a bunch of content. I have three copies of the site in the project directory because of the way I'm merging changes from the latest Joomla SVN into my own source tree.
Needless to say switching to and from TextMate causes a considerable delay - between 5 and 10 seconds on my G4 PowerBook. I like to flip back and forth between a web browser, terminal and TM pretty frequently - at times as much as maybe a few times a minute
- so I'm spending a fair proportion of my time waiting for TM at
the moment.
Does anyone have any tips for speeding up TM's project scanning? Obviously I could rearrange my project to move some of the less frequently used files into another project - but I'd rather not do that if it's avoidable.
It seems that TM only really needs to rescan the directories that are open in the project drawer and any open files - a full scan could be then be done lazily if at all. I get the impression it currently walks the whole directory tree - is that correct? If it's not doing that what's taking so long?
Afaik it's doing exactly that because cmd+t wouldn't work anymore if it doesn't.
Niels
On 16 Nov 2006, at 16:57, Niels Kobschätzki wrote:
Afaik it's doing exactly that because cmd+t wouldn't work anymore if it doesn't.
Aha - I forgot about cmd+t because I keep forgetting to actually use it :)
Still, the directory scan could be backgrounded once it's done enough to update the project drawer and any updated files. You'd then only notice the delay if you tried to cmd+t before the full scan was complete.
Obviously the implementation details are up to Allan. In the mean time does anyone have any tips for speeding things up with the current version of TM? I've even found myself using vi instead of mate to make small edits from the shell rather than wait for TM to get its act together - and that's a completely barbaric state of affairs :)
On Nov 16, 2006, at 11:57 AM, Niels Kobschätzki wrote:
Afaik it's doing exactly that because cmd+t wouldn't work anymore if it doesn't.
I'm sure Allan has something in mind for 2.0 but in 1.5.x a preference for "Do not rescan project automatically" combined with a menu-option or context-menu option in the drawer for force the rescan would do nicely. It could also wait till you cmd-t before it does the rescan. And/or make the rescan async. And/or try to tie into whatever framework fs_usage makes use of (that probably only works for root and in tiger though). :-)
Anyway, the frequently given workarounds are:
1) Only drag what you need into the project. 2) Use a virtual desktop such that TextMate doesn't lose focus such as http://virtuedesktops.info/
j.
On 16 Nov 2006, at 17:05, Jay Soffian wrote:
- Only drag what you need into the project.
Yup. Unfortunately I pretty much need all of it - or at least can't easily predict which bits of the project I definitely won't need.
- Use a virtual desktop such that TextMate doesn't lose focus such
I'm surprised that works - does the OS really allow more than one application to hold the focus at any time?
On Thu, Nov 16, 2006, Andy Armstrong wrote:
- Use a virtual desktop such that TextMate doesn't lose focus such
I'm surprised that works - does the OS really allow more than one application to hold the focus at any time?
No, that won't work. It only gives you the impression that multiple apps have focus :)
Ben
On 16 Nov 2006, at 17:32, Ben Bleything wrote:
No, that won't work. It only gives you the impression that multiple apps have focus :)
I presume that the important thing is that it gives /TextMate/ the impression that it still has focus :)
(unless when you said 'you' you were referring to an anthropomorphic TM or from Allan's perspective)
On Thu, Nov 16, 2006, Andy Armstrong wrote:
On 16 Nov 2006, at 17:32, Ben Bleything wrote:
No, that won't work. It only gives you the impression that multiple apps have focus :)
I presume that the important thing is that it gives /TextMate/ the impression that it still has focus :)
Right, yeah. What I was getting at is that the app will lose focus, unless I'm mistaken (which, you know, is possible :))
(unless when you said 'you' you were referring to an anthropomorphic TM or from Allan's perspective)
I meant 'you' as in 'the user' :)
Ben
On 16 Nov 2006, at 16:55, Andy Armstrong wrote:
I've got a project here with 16,500 files in it (75,000 if you count the subversion metadata). It's a Joomla 1.5 website with a bunch of content. I have three copies of the site in the project directory because of the way I'm merging changes from the latest Joomla SVN into my own source tree.
Needless to say switching to and from TextMate causes a considerable delay - between 5 and 10 seconds on my G4 PowerBook. I like to flip back and forth between a web browser, terminal and TM pretty frequently - at times as much as maybe a few times a minute
- so I'm spending a fair proportion of my time waiting for TM at
the moment.
Does anyone have any tips for speeding up TM's project scanning? Obviously I could rearrange my project to move some of the less frequently used files into another project - but I'd rather not do that if it's avoidable.
It seems that TM only really needs to rescan the directories that are open in the project drawer and any open files - a full scan could be then be done lazily if at all. I get the impression it currently walks the whole directory tree - is that correct? If it's not doing that what's taking so long?
Yes, it does walk the entire directory structure. I noticed something similar when opening up a project, and ran Sampler on TextMate and found that it was spending all its time querying the file system.
It would be better if TextMate scanned directories on demand- ie when you opened them in the project drawer.
-- Kind regards, James Milne
On 16 Nov 2006, at 16:58, James Milne wrote:
It would be better if TextMate scanned directories on demand- ie when you opened them in the project drawer.
Or from 10.4 it could use the filesystem change monitoring API:
http://www.macosxhints.com/article.php?story=20060817044149264
Just hypothesising here, but doesn't the OS now support file change/ addition notifications to allow spotlight to work? This could be used so TM is told when something in its project directories changes rather than it having to go check every time.
Dave.
On 16 Nov 2006, at 16:58, James Milne wrote:
On 16 Nov 2006, at 16:55, Andy Armstrong wrote:
I've got a project here with 16,500 files in it (75,000 if you count the subversion metadata). It's a Joomla 1.5 website with a bunch of content. I have three copies of the site in the project directory because of the way I'm merging changes from the latest Joomla SVN into my own source tree.
Needless to say switching to and from TextMate causes a considerable delay - between 5 and 10 seconds on my G4 PowerBook. I like to flip back and forth between a web browser, terminal and TM pretty frequently - at times as much as maybe a few times a minute - so I'm spending a fair proportion of my time waiting for TM at the moment.
Does anyone have any tips for speeding up TM's project scanning? Obviously I could rearrange my project to move some of the less frequently used files into another project - but I'd rather not do that if it's avoidable.
It seems that TM only really needs to rescan the directories that are open in the project drawer and any open files - a full scan could be then be done lazily if at all. I get the impression it currently walks the whole directory tree - is that correct? If it's not doing that what's taking so long?
Yes, it does walk the entire directory structure. I noticed something similar when opening up a project, and ran Sampler on TextMate and found that it was spending all its time querying the file system.
It would be better if TextMate scanned directories on demand- ie when you opened them in the project drawer.
-- Kind regards, James Milne
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Nov 16, 2006, at 12:08 PM, Dave Baldwin wrote:
Just hypothesising here, but doesn't the OS now support file change/ addition notifications to allow spotlight to work? This could be used so TM is told when something in its project directories changes rather than it having to go check every time.
Before this gets out of control, see the FAQ:
http://macromates.com/wiki/Main/FAQ
Q: Is there a way to disable the automatic update of the Project Drawer? Since I'm editing files that are located on a slow network drive (DAV) it takes several seconds before TextMate becomes responsive when I tab back to it.
...
Do we need Allan to spend time coming up with a fix for 1.5 or would we rather his time be spent toward 2.0? I vote for the latter. :-)
j.
On 16 Nov 2006, at 17:13, Jay Soffian wrote:
http://macromates.com/wiki/Main/FAQ
Q: Is there a way to disable the automatic update of the Project Drawer? Since I'm editing files that are located on a slow network drive (DAV) it takes several seconds before TextMate becomes responsive when I tab back to it.
And the answer:
A: You can create a static (thus non-updating) project by dragging files (instead of folders) to the project drawer.
A script to create a (static) tmproj file from a folder can be found here (save as build_project.sh and chmod a+x build_project.sh and run it like so ./build_project.sh myfolder/ > myproject.tmproj).
I could do, yes - but I'd like to see new files that arrive via svn up without manually adding them to the project.
Another workaround is to use a desktop manager program which allows you to have multiple desktops, which prevent an application from losing focus which switching.
OK, that answers my question about whether that works :)
Do we need Allan to spend time coming up with a fix for 1.5 or would we rather his time be spent toward 2.0? I vote for the latter. :-)
You present that as a clear either-or choice - which it may not be. It might be possible for Allan to add an option to switch on manual project updates in just an hour or so - maybe less. Also it might be that if Allan devoted some time to this he'd have code he could use in 2.0. I'm speculating of course - but then so are you :)
On 16 Nov 2006, at 17:36, James Edward Gray II wrote:
It might be possible for Allan to add an option to switch on manual project updates in just an hour or so - maybe less.
I'm sure, if it were that easy, it would have happened long ago.
Isn't that just more speculation? We're getting off topic now - but clearly there's nothing about switching focus that requires TM to do a project scan other than its desire to display any updates to the project. It's hard to see how it could be difficult to make it so that the project scan was manually triggered.
On 16. Nov 2006, at 18:46, Andy Armstrong wrote:
[...] It's hard to see how it could be difficult to make it so that the project scan was manually triggered.
I wish I could just point to the source and say “go ahead” :p
Anyway, fixing this for 1.5.x is certainly more work than a few hours, and it will not give any reusable code for 2.x. I am way behind on 2.0 development, so I try not to take any detours working on code that has been marked as scrap.
On 16 Nov 2006, at 18:00, Allan Odgaard wrote:
[...] It's hard to see how it could be difficult to make it so that the project scan was manually triggered.
I wish I could just point to the source and say “go ahead” :p
The circumstances under which you might consider releasing the source is a whole other debate :)
Anyway, fixing this for 1.5.x is certainly more work than a few hours, and it will not give any reusable code for 2.x. I am way behind on 2.0 development, so I try not to take any detours working on code that has been marked as scrap.
OK - no problem. Thanks for the confirmation. I assume in 2.0 I'll be able to drop / in a project drawer and use TM as a finder replacement? :)