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

Markdown makes huge amount of memory allocations during indexing #120

Open
piotrtomiak opened this issue May 18, 2023 · 1 comment
Open

Comments

@piotrtomiak
Copy link
Contributor

piotrtomiak commented May 18, 2023

The LookaheadText.testFromPosition depends on String.subSequence which actually copies the content over to a new array:
ultimate – LookaheadText kt  jetbrains markdown  2023-05-18 21-17-40

As a result during 15s of indexing, even 1.7GB of data can be allocated. You can check it out by profiling indexing of https://github.com/JetBrains/ring-ui/tree/master in WebStorm.

It seems that it would be best to use something similar to com.intellij.util.text.CharSequenceSubSequence to save a lot on memory allocations.

@piotrtomiak
Copy link
Contributor Author

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

1 participant