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

Keystroke performance regression? #53

Closed
raylee opened this Issue May 21, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@raylee
Copy link

raylee commented May 21, 2018

First off, thanks for the great extension!

Second, my installation updated to 1.17 today from a much older version (perhaps 1.10-ish? -- it's been a few weeks since I've restarted VS Code). What I noticed today on my existing todo file is that every keystroke has a CPU lag with it, which is really distracting.

I started a new empty todo file to see if that had the same issue. While it was unnamed, typing speed was fine. When I saved it as a todo+ file so the extension would kick in, it suddenly got laggy.

If you can point me to a guide on the internet for doing local vscode extension development, I can try to bisect the repository and see if I can locate what changed.

@fabiospampinato

This comment has been minimized.

Copy link
Owner

fabiospampinato commented May 21, 2018

This extension is quite heavy CPU-side, much more than it should. It's currently recomputing the decorations every time the content of the file changes, for every line. This thing is so unoptimized that I would consider it a bug, I'll work on this after I finish fixing some other long-open issues.

I've recently added statistics, which are quite heavy on the CPU, especially project-level statistics. Can you try turning them off ("todo.statistics.project.enabled": false in your settings) and see if that solves your issue?

If it doesn't, are you running this in some not-so performant hardware?

If you can point me to a guide on the internet for doing local vscode extension development, I can try to bisect the repository and see if I can locate what changed.

I don't know any such guide I could recommend you, but what you'd have to do is basically:

  • Clone this repo
  • Run npm install inside it
  • Open it in VSC
  • Run Debug -> Start Debugging in VSC

@fabiospampinato fabiospampinato added the bug label May 21, 2018

@raylee

This comment has been minimized.

Copy link
Author

raylee commented May 21, 2018

Adding "todo.statistics.project.enabled": false did the trick, it feels native speed again. Thanks!

@fabiospampinato

This comment has been minimized.

Copy link
Owner

fabiospampinato commented May 21, 2018

Good. Maybe I'll disable this by default in the next update until I fix the performance issues.

@raylee

This comment has been minimized.

Copy link
Author

raylee commented May 21, 2018

I think that's a good thing to consider. To answer your question above, I'm on a MacBook Pro (Retina, 15-inch, Late 2013), 2GHz i7, 16GB RAM, SSD system. While it's a bit long in the tooth, it's rare for something to be laggy.

@fabiospampinato

This comment has been minimized.

Copy link
Owner

fabiospampinato commented May 22, 2018

As of v1.18.1 the extension should perform less work, I think even with project-level statistics enabled it should be faster than it was before. I'm closing this in favor of #54.

@raylee let me know if with everything enabled the extension still doesn't feel snappy enough for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment