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

Rainbow parenthesis extremely slow #6

Closed
DanielRose opened this issue Dec 4, 2013 · 3 comments
Closed

Rainbow parenthesis extremely slow #6

DanielRose opened this issue Dec 4, 2013 · 3 comments
Assignees
Labels
Milestone

Comments

@DanielRose
Copy link

When the rainbow parenthesis option is enabled, this slows down the editor a lot, based on the size of the file being edited. Additionally, if ReSharper is enabled, this feature interacts negatively with ReSharper, slowing down everything exponentially.

Some rough numbers on what I mean. This is with a large file, ex. 50000 LOC. But even with a medium-sized file, ex. 2000 LOC you'll notice this. My machine is a Core i7-2600 with 3.4GHz running Windows 7, 64bit, VS2010, ReSharper 8.0.1.

If I type by holding down a key, the repeat rate is slowed down to less than 10 characters per second. If I then press Undo (Ctrl+Z), the main thread of VS is stuck at 100% for several minutes (!!!).

If I disable ReSharper, then the numbers are much better, about 20 cps and maybe 3 secs pause.

With ReSharper and rainbow parenthesis disabled, I have 30cps and instantaneous Undo.

With rainbow parenthesis disabled, ReSharper enabled, I have 30cps and maybe a half-second pause on Undo.

I did a quick debug of the VS process. The time is spent in Text/RainbowTagger.cs, line 66. Apparently this is called over and over again.

@tomasr
Copy link
Owner

tomasr commented Dec 4, 2013

Thanks a bunch for the detailed bug report, Daniel! I do not have resharper mightself to test it, but I am already in the process of substantially rewriting how much of the processing happens here, but the big issue I've noticed is that raising the TagsChanged event from the plugin to notify VS that the braces might have changed is triggering all sorts of nasty interactions with other extensions.

Would you be willing to test a beta version with my current set of changes and see how it works for you?

@DanielRose
Copy link
Author

Sure! I had to uninstall it due to the bad performance, but besides that it looked great.

@ghost ghost assigned tomasr Dec 20, 2013
@tomasr
Copy link
Owner

tomasr commented Dec 20, 2013

Substantial performance work has been done in develop branch for v1.2. Closing for now.

@tomasr tomasr closed this as completed Dec 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants