XCode project search dramatically slower than grep
XCode project search dramatically slower than grep
- Subject: XCode project search dramatically slower than grep
- From: Tim Gogolin <email@hidden>
- Date: Wed, 01 Sep 2004 18:44:02 -0500
Is there a known performance problem with the XCode 1.5 "Project Find"
dialog?
I set up a "whole project" set of custom options, (either "All
Candidate Files" or "files described by regex" doesn't seem to matter),
"Textual" search, "Contains", and "ignore case".
Elapsed time: about 30 seconds.
grep -ri foobar .
accomplishes the same thing in under 2 seconds.
I realize that XCode has more overhead than grep, in that XCode is
pre-iterating the entire search tree to count the number of files so it
can show a reasonable progress indicator, but that pre-iteration takes
about 5 seconds; the actual search still takes an incredible 25
seconds... (and XCode should at least be able to COUNT the number of
files faster than grep can SEARCH them).
All timings were done on a Dual 2 Ghz, 2.5G RAM. Observing with "top"
shows that XCode memory usage never got anywhere near the available RAM
in the computer, so that's not the issue. Activity monitor showed very
little disk activity and CPU activity hovered between 95% to 105%. No
other process had any appreciable CPU usage so I assume you aren't
launching an NSTask and communicating with it...
Is the XCode search algorithm written in Cocoa (using **LOTS** of
NSStrings?)
I realize that grep isn't Unicode savvy, and XCode's search might be,
but is there any way to speed it up for the overwhelmingly common case
of ASCII source text? (i.e. NO Unicode canonization required)
-- Tim Gogolin
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.