-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Abracadabra extension causes performance issues with other extensions (prettier formatting, etc.) #902
Comments
Seeing very bad performance when doing "Go to definition" in a large typescript definitions file (115k lines): out.mp4When trying to save, I get this: Using VS Code's extension bisect, found that Abracadabra is the cause - when it is disabled, performance in the 115k line file is awesome |
Thanks for reporting. To be honest, I'm not surprised. I didn't have perfs in mind when I started implementing these refactorings. It was working fine on files of reasonable size at first. The more refactorings we added to the catalog, the worse the perfs went, especially on large files. The exclusion feature was supposed to help, but it doesn't seem to. We have had other obvious instances of this (see #416) and I believe something like #836 would be the solution. I haven't taken the time to dig into it, but I will think about it. In the meantime, https://marketplace.visualstudio.com/items?itemName=p42ai.refactor may be a better alternative so you have a catalog of refactorings, but with better perfs (I think). |
A simple short-term solution might be to disable the feature for files above a certain size. I think I've seen code-folding or some other feature take this approach with a 1-time popup indicating that it self-disabled due to file size. |
Related to #902 Disable refactorings on large files. Configurable. 10_000 is the default.
@dinofx that's a great idea! I just shipped a release that contains a new setting I also made changes that reduced the bundle size quite a lot for the latest release. I think that should also help: #934 |
I often open large bundles, but the problem is that they are minified and therefore 1 line long. |
@j4k0xb true. A size limit would certainly be smarter indeed 🤔 |
The new option However, feel free to re-open if you still experience bad performances because of Abracadabra. |
I have prettier set as my formatter and format on save enabled. If I:
I see a popup and the save is delayed for a long time.
If I disable this extension, the problem goes away. I tried setting an ignore pattern to include the folder containing the large JS file, but I wasn't able to workaround the delay.
The problem has affected other extensions as well. For example, I tried several extensions that simply display the absolute character offset. When working in large files, these extensions would all display an initial offset but then would stop updating as the caret moved around. Also I couldn't invoke the "go to offset" command for the extensions.
The text was updated successfully, but these errors were encountered: