On 27/5/2006, at 4:17, Allan Odgaard wrote:
But when speaking of the parser and other text editors (that you bring up): the performance difference is a) psychological because TextMate does not redraw the first page of the document before the entire document has been parsed b) because TextMate does something very different compared to the editors you mention and c) it generally has more complex grammars (try put PHP in an HTML here doc in a ruby script embedded in Erb tags in an HTML file -- unlike other text editors, TextMate handles this gracefully.)
Data: a 2.5 MB text file (plain text / no coloration / 225800 lines, none exceeding 30 characters) structured as follows:
ABACA~ ABACULE~ ABAISSABLE~ ABAISSAIENT~
Problem: Replace all the 225800 occurrences of "~\n" by "\n" (iMac G4 800 Mhz, 1GB ram, 10.4.6): TextWrangler: 30 s (gracefully interruptible) TextMate: who knows? (forced to quit after 15 mn)
Looks like there is some psychological issue here, indeed. ;-) I do love TextMate. But for such search/replacements, I couldn't live without TextWrangler.
Cheers,
A.
On 27 May 2006, at 11:57, Aristide Grange wrote:
Problem: Replace all the 225800 occurrences of "~\n" by "\n" (iMac G4 800 Mhz, 1GB ram, 10.4.6): TextWrangler: 30 s (gracefully interruptible) TextMate: who knows? (forced to quit after 15 mn)
What happens if you replace '~$' with '~' instead?
On 27/5/2006, at 12:57, Aristide Grange wrote:
On 27/5/2006, at 4:17, Allan Odgaard wrote:
But when speaking of the parser and other text editors (that you bring up): the performance difference is [...]
[...] Problem: Replace all the 225800 occurrences of "~\n" by "\n" (iMac G4 800 Mhz, 1GB ram, 10.4.6):
I think you missed this part of my reply:
> there are half a dozen other things which do affect the > performance of TextMate in a bad way (i.e. scales badly, > the language parser scales just fine [1]), and I will > gradually improve these things.
Your searcn’n’replace example has nothing to do with the language parser.
Aristide Grange wrote:
Data: a 2.5 MB text file (plain text / no coloration / 225800 lines, none exceeding 30 characters) structured as follows:
ABACA~ ABACULE~ ABAISSABLE~ ABAISSAIENT~
Problem: Replace all the 225800 occurrences of "~\n" by "\n" (iMac G4 800 Mhz, 1GB ram, 10.4.6): TextWrangler: 30 s (gracefully interruptible) TextMate: who knows? (forced to quit after 15 mn)
I'm sure we've been through this whole thing before... OK, let's make such a beast: if the stuff between the lines is "long.pl" then
./long.pl > long.txt
gives a suitable test file called long.txt ======================================================================= #!/usr/bin/perl foreach (1..60000){ print<<END; ABACA~ ABACULE~ ABAISSABLE~ ABAISSAIENT~ END } =======================================================================
Looks like there is some psychological issue here, indeed. ;-) I do love TextMate. But for such search/replacements, I couldn't live without TextWrangler.
I can: I do. My withdrawal from BareBones is complete (I still own a current BBEdit license; well, I think it's current -- they might have tried to gouge another slab of upgrade cash from registered users while I haven't been watching). Anyhow... ignoring that(!).
Just be a tiny bit creative here: for example, if you want to search/ replace in a massive file such as long.txt use TextMate's integration with standard unix utilities: for example...
Text => Filter through command...
perl -pe 's#~\n#\n#'
On my eMac (similarly configured to your imac) it's about 12 seconds to do the replacement, and the command is no harder than any Find/ Replace dialog box. Yes, the built-in mechanism should probably behave better, but it's *really* easy to work around. Unless, of course, you're simply hunting for nits to pick.
Cheers, Paul