A (temporary?) fix for the current Find in files threading safety issues. (crashes when canceling / clicking on results during search... / cannot run in debug mode - assertions...)
Basically, now, the search is done in the main Npp thread (so you can't interact with the main window during the search), but there is a secondary thread which allows the user to cancel the search (simple message box).
I believe it's a good start...
Code is based on source from 27/11/2008
Y N
2008-11-28
patch
Don HO
2008-11-30
By reading your comment w/o applying the patch, It seems FindInFiles behaviour of v5.1.1 will be changed after applying this patch (ie. user can stop the search, but have no access on Notepad++ GUI during search). That is not what I expect.
Find in files thread issue should be fixed by adding semaphore or mutex, but not by changing the current behaviour, which is convenient IMO.
Don
Y N
2008-12-01
It is not possible to work with N++ during a file search even now - before applying the patch.
Y N
2008-12-01
Another important thing ---- SPEED
Currently in 5.1.1 the find in files speed is EMBARRASSING!
It took my powerful PC more than 100 seconds to find 25000 results (and as I mentioned before, you CAN'T continue with your work during this time).
Before the search in a new thread feature was added, it took less than 4 seconds!!
In visual studio 2008 it takes about a second.
You have got to do something about it.
Don HO
2008-12-01
Indeed, I notice the superior performance in find in files feature w/o thread while a large search (after applying your patch).
However the UI blocking while search is a aesthetic issue (quite annoying for me).
Could we have a compromise between the both?
Don
Don HO
2008-12-04
Don HO
2008-12-04
After intensive test, this patch will be included in the next release.
Don
Don HO
2008-12-15