-
Notifications
You must be signed in to change notification settings - Fork 93
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
Experimental formatter is slower than current formatter with large XML file #1368
Comments
also throws some exceptions:
|
on my mac, with the experimental fomatter, I see:
without grammar aware formatting:
With the legacy formatter:
Not as bad as on your machine, but still way worse than the old formatter |
The main problem comes from https://github.com/eclipse/lemminx/blob/09b3f498f2aa13f6a6608f8a60dfbd1bf797608c/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/extensions/contentmodel/participants/ContentModelFormatterParticipant.java#L55 which is for each element. We need to cache this result in a Map for instance initialized by experimental formatter. |
Thanks @fbricon to share your information! We need to fix your stack trace error + performance. |
I'm interested in how much Jessica's PR helped with your performance issues, Angelo, since while it was a noticeable improvement for me, it wasn't a 5x improvement. |
Indeed we need to investigate how we could improve again the experimental formatter performance. |
Okay. Since the main issue with the grammar aware formatting has been resolved, let's track any further investigation and improvements in #1379. |
There are interesting large TEI XML files at https://www.wwp.northeastern.edu/outreach/seminars/_current/handouts/tei_samples/index.html
If you download
And you try to format the XML with experimental formatter, it takes some times although with the current formatter it is very q
We need to investigate the performance issue with this sample.
When grammar aware formatting is disabled, it takes around 148ms.
The text was updated successfully, but these errors were encountered: