Join GitHub today
Non-blocking find/replace actions #685
the work Notepad++ does triggered by the find-and-replace dialog should be done in a worker thread and should be cancelable.
This is because such actions can sometimes last very long and can even cause you to think the GUI will never respond again and to force-terminate the program. This is especially true for large files.
If there's a way to get this information, there should even be a progress bar. Alternatively, the information of the last processing time would be valuable, if it's a long one.
An optional sound after long operations would also be appreciated.
Related issue: #365
Because the find-and-replace dialog already has many buttons, probably there shouldn't be added an additional
The following image is an illustration of how the progress could be indicated. It shows the bottom of the find-and-replace dialog.
The remaining time should appear as soon as enough data was gathered for a non-jumping presentation (short fixed amount of time?) and only if it's greater than or equal to 2 seconds at this point.
The developer of the PCRE2 library told me via e-mail that he is implementing an end offset feature for the functions
Because the processing time of different regular expressions can differ very much, the application should first process a short range of the subject string and see whether the PCRE2 function returns quickly. If it returned quickly, the length of the ranges processed at once can be increased. This way, the length can be leveled out at a frequency of, say, 20 Hz (50 ms between GUI updates).
Old text about conversation with the developer:
Of course, a worker thread is still necessary, because single matches between the callouts can still last very long. (For your information: The PCRE2 developer also mentioned
There's information in this issue that is still relevant. This issue is an addition. Surely, not every detail was planned as I described it. It wasn't said where it is planned. Not in an issue? Then we would see a reference here. I expect something like that.