Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extreme input lag at top of long HTML file, with code-highlights disabled. #384

Closed
jesseleite opened this issue Sep 4, 2015 · 7 comments

Comments

@jesseleite
Copy link

I'm noticing extreme input lag, but only in very specific situations. For example:

  • Long HTML file
  • Editing text near top of file
  • Minimap enabled
  • Minimap's code-highlighting disabled

I used package-cop to narrow it down to this. What could be happening with the rendering of the minimap without code-highlights, which might cause this?

Here's an example screencast, but even at 60fps it's very hard to see. Very easy to feel though, and should be easy to reproduce if you follow my exact steps above. With input lag, sometimes it spits out 2 or 3 characters at a time while it's trying to catch up. Without the input lag, each character displays as fast I'd expect in --safe mode.

minimap-input-lag3

Seems like such an obscure issue… but it’s very noticeable when it happens. I can just enable code-highlights to avoid it, but I prefer code-highlights disabled so that I can better see minimap's git-diff colouring.

@abe33
Copy link
Contributor

abe33 commented Sep 8, 2015

Thanks for the report, I never noticed this issue but I don't really use minimap without code highlighting so I'll have to profile what's going on here.

@jesseleite
Copy link
Author

Were you able to reproduce the lag on your end?

@abe33
Copy link
Contributor

abe33 commented Sep 8, 2015

Yes I can reproduce it, by profiling I could narrow down the issue to the routine that read the colors from the DOM, it looks like it fall in a case where the cache isn't properly used. I think it should be pretty easy to fix. Stay tuned.

@jesseleite
Copy link
Author

Awesome, thank your for your time.

@abe33 abe33 closed this as completed in b9ae0f5 Sep 8, 2015
@jesseleite
Copy link
Author

It's fast now, thank you! Just one param in that git diff :) ...was it difficult to find the cause?

@abe33
Copy link
Contributor

abe33 commented Sep 8, 2015

Nope, profiling always help in that kind of context. Once I know where there's a bottleneck I just put some logs to see why the cache was never used and found I was forcing to not use the cache in that case, which was no longer needed (I don't really remember why I did this but it probably dates from a time when I didn't listen to stylesheets additions and had to prevent the cache to store a text color from before the themes loading).

@jesseleite
Copy link
Author

Interesting. Well thanks for the fix man. Have a great day!

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

No branches or pull requests

2 participants