Replace "Editor is not responding" with progress indicator on large find/replace #1096
Description
Description
I have a moderately large (~4MB) single-line JSON file that I opened with Atom. (Also observed in safe mode).
The file opens, though without syntax highlighting.
In an effort to make the file more readable, I try doing a Find },
with Replace },\r\n
in the file. I have to do this in regex mode because of the newline in the Replace.
There are about 25K results found.
This message pops up pretty frequently for a moderately long period (>1 hour):
If I open Task Manager, it generally looks like the processing continues while the message is displayed, but in terms of UI it seems like I have to keep clicking on the "Keep waiting" option in order for the processing to continue.
It's also not clear if the program is working or if it's hung completely and I should just exit the program. Doing the same find/replace with a shorter file, after one or a small number of these the process does complete successfully, but when it's been over an hour it becomes less clear whether it will eventually succeed or not, and it becomes more likely the user will accidentally hit "Force Close" simply because there are so many of these popups (and that's the default).
It would be better if Atom had some visual indicator regarding progress of the find/replace. For example, the background of the Replace input field could become a progress bar, filling up as the replace operation proceeds, as more and more of the 25K results get replaced.
Simply assuming that all find/replace operations will happen so fast the user won't notice is inaccurate.
Simply adjusting the number of results found would not work in this example, where the "find" query is also in the "replace" string.
Versions
atom --version:
Atom : 1.23.2
Electron: 1.6.15
Chrome : 56.0.2924.87
Node : 7.4.0
apm --version:
apm 2.4.2
npm 6.2.0
node 10.2.1 x64
atom 1.40.0
Windows 10