Atom has a delay of ~1 second to respond to input when re-focusing. Seems to only affect Atom when a project folder is in a git repository.
Steps to reproduce:
Open Atom
Add a directory to your project that is a git repository or a subfolder of a git repository.
Open a file or create a new document in the same Atom session.
Switch to a different application.
Click back on Atom and wait for your input to be accepted.
When you click back on Atom there is a delay of 1~1.5 seconds before your action is performed (tab switch if you clicked a tab, cursor to start blinking if you clicked in the text of a document).
I ran the profiler during the task switching and I got the following data (rename the file to .json if necessary):
TimelineRawData-20151112T091728.txt
I am able to solve the issue only by removing the git folder from my project.
I’m not versed in reading the profiling data but it looks like a call to git-repository.js
is taking a lot of time up when the re-focus happens.
Does this still need reproduction? I can get it to occur every time. Windows 10.
+1, my OS is windows 10
Not just windows I think. I noted this in a cpu trace on linux 64 bit, Debian betsy. Node version v5.7.1. Atom 1.4.0
Edit: Still exist on atom=1.7.1 linux 64 bit, Debian betsy, node=5.10.1.
I can reproduce this on Linux (Arch, 64bit, atom 1.6.2), so definitely not Windows-only.
CPU-20160419T103753.cpuprofile.zip
Any workaround for this? Can we disable
refreshOnWindowFocus
? Atom is really unusable now.Can we please have a linux tag added to this too? Two reports of this on linux so far.
Also experiencing this on Windows 10. Every time the window regains focus I get an annoying pause before it becomes responsive. For me, the pause is about 1.6s which doesn’t sound like a lot but when you’re constantly switching back and forth during testing, it’s really noticeable. I opened the developer tools and the profiler shows that
GitRepository.refreshStatus()
is 100%% to blame for the pause.Confirmed:
10.12.6
1.18.0 x86
I generally work on 6+ projects at a time in one Atom view, all Git repositories… and switch in and out of Atom/Terminal/Browser/etc constantly. Sitting at ~2-3sec refocus lag which is incredibly distracting and killing efficiency. I’ve disabled all un-necessary packages which didn’t seem to help at all.
Any ETA on a resolution? This is unfortunately tetering on unusable.
I’ve started to experience this only last week, it never before was an issue.
Windows 10
Atom 1.19.3
Fresh install Ubuntu 16.04, latest atom. Randomly freezes (as in I have to kill the process and restart atom) when alt+tab back to atom. Did not happen with Ubuntu 14.04.
Anyone have a workaround for this? Is this a different issue?
Hey everyone; I’m really sorry this went unaddressed for so long. It is fixed on master and will ship in Atom 1.22.0 (and 1.22.0-beta0 if you’re on our beta channel).
The way we solved this was to introduce new native APIs for refreshing the git status on a background thread; that way we don’t need to spawn a child process.