GitHub package negatively impacts global editor performance. #1478
Description
Prerequisites
- Have you tried to reproduce the problem in Safe Mode?
- Have you followed all applicable steps in the debugging guide?
- Have you checked the FAQs on the message board for common solutions?
- Have you checked that your issue isn't already filed?
Description
Hey Atomizers! I was recently trying to debug some issues with editor performance, where text input "felt" kinda sluggish, and noticed something odd about the GitHub package. It looks like every single text input event, even in projects without a Git repo, is triggering an event in this code base that causes a deep, deep flame in the performance flame chart and a long update cycle, both in and out of safe mode. (It's much more noticeable with safe mode disabled, likely because other packages are also causing input delays of varying severity.)
I'm getting acquainted with the code base and trying to figure out some details, but as far as I can tell it's something to do with the CommitCommentContainer
component---maybe with its GraphQL integration. (I've enclosed the performance reports below for reference.)
I'd be happy to submit a pull request optimizing this pathway, if I can get to the bottom of what's causing it to fire so frequently and/or take so long to resolve. If you have any ideas about what might be going on, I'd be glad to hear them!
Thanks in advance for looking into this, and thanks for all your hard work on this package.
Steps to Reproduce
- Enable GitHub package.
- Enter text in any editor.
- Wait.
Expected behavior:
The editor should complete its keypress
handler in a reasonable amount of time.
Actual behavior:
keypress
events take as long as 52ms to resolve.
Reproduces how often:
100% of the time.
Versions
Atom : 1.28.0-beta0
Electron: 2.0.0
Chrome : 61.0.3163.100
Node : 8.9.3
Additional Information
Here are the exported performance profiles from Electron's Chrome: https://cl.ly/3I2z1p1Q321L.