Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Replace "Editor is not responding" with progress indicator on large find/replace #1096

Closed
wbt opened this issue Aug 14, 2019 · 3 comments
Closed

Comments

@wbt
Copy link

wbt commented Aug 14, 2019

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):
Editor is not responding - screenshot

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

@rsese rsese transferred this issue from atom/atom Aug 14, 2019
@rsese
Copy link

rsese commented Oct 22, 2019

Thanks for the feedback 👍 I chatted with the other maintainers and we're going to go ahead and close in favor of #653. It's not the exact same issue but your suggestion is something that can be considered along with the general issue where find and replace is slow/can freeze Atom.

@rsese rsese closed this as completed Oct 22, 2019
@wbt
Copy link
Author

wbt commented Oct 22, 2019

In my view, I think these are separate issues. #653 is about fixing the underlying slowness to make the process go more quickly. I support that, and it'll help. However, no matter how fast that gets, there will always be some files that are large enough that Atom is just going to take a long time to process find/replace. Those cases won't be as common when the operation is faster, but they won't go to zero.

This Issue (which is more applicable for the last comment in that one) requests the replacement of "Editor is not responding" with a progress indicator. I still think that's a good idea and if it were up to me, I'd reopen this (while also leaving the other one open to address performance).

@andrewboldi
Copy link

Yes I agree a progress indicator would be very helpful in determining if Atom is truly crunching through the find and replace or it has crashed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants