Hi,
this is my first try to fix 3566596. This patch makes the BoyerMooreSearchMatcher
abort-able. The problem with the PatternSearchMatcher is that it uses the standard
java classes Pattern and Matcher. An Matcher.find sadly doesn't react on the Threads
interrupt state! I'm not sure how to solve this. there is this trick (use a interruptible
CharSequence) on stackoverflow but I'm not sure if this is the right thing to do:
http://stackoverflow.com/questions/7125732/how-to-terminate-matcher-find-when-its-running-too-long
any ideas?
| Submitted | thomasmey - 2012-10-18 - 08:42:17z | Assigned | kpouer |
|---|---|---|---|
| Priority | 5 | Category | None |
| Status | Open | Group | None |
| Resolution | None | Visibility | No |
| 2012-11-13 - 07:32:10z ezust |
looks good to me, except I wonder if we can remove the duplicate code that is introduced
in HyperSearchResults.java. |
|---|---|
| 2013-02-07 - 08:51:57z kpouer |
It is probably a good start, but not enough, a big part of the time it takes is also listing all files before starting search. |
| 2013-03-16 - 10:05:00z thomasmey |
"It is probably a good start, but not enough, a big part of the time it takes is also listing all files before starting search." That's actually not true! It takes only long to produce the file list if the option "skip binary files" is enabled -> this option lead to a read of the first x bytes of all files in the directory structure. this is what takes long to create the list of all files! |
| 2013-04-15 - 17:14:19z ezust |
hunk#3 fails to apply to trunk |
| 2013-04-16 - 08:13:27z kpouer |
It depends on what you call long, I tried on a project listing files before starting search took 8 seconds (without skipping binaries) |
| 2012-10-18 - 08:42:18z thomasmey |
Make-Hypersearch-Abortable.patch v1 |
|---|---|
| 2013-04-15 - 18:17:54z thomasmey |
Make-Hypersearch-Abortable.patch v2 - rebased against trunk |