-
Notifications
You must be signed in to change notification settings - Fork 20
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
Parsing takes absurdly long time for some simple documents #115
Comments
I don't think this is caused by the parser itself, but possibly some further processing steps? If you put your sample document from #4429 into https://siefkenj.github.io/latex-parser-playground/ it parses almost instantly. |
I've just tried that and indeed it is practically instant, but then I don't know what's going on because the long times that LaTeX Workshop reports seem to be calculated across a call to @James-Yu are you able to reproduce the issue in LaTeX Workshop? If not, I'll just close this issue since it must be on my end, but if you can reproduce it, I guess we go back to the original issue and close this one? Unless you still think the bug is with Sorry to discuss LaTeX Workshop specifics on an issue for |
I can reproduce the problem with LaTeX Workshop, and the playground parsed the content very fast. However, it's quite unlikely an issue related to LW. I do think we can continue the investigation back in the other issue and close this one for now, until the root cause is identified. |
(For anyone else: We're back from LW #4429 again.) I've tried this on various different builds and the problem seems to have been introduced between v1.6.1 and v1.7.0. On v1.6.1, this script shows
whereas on v1.7.0, I get
|
On further investigation, it seems to have started in 05ed77e "Switch to Vite for building". To double check, I made two fresh clones, checked out c8213f8 on one and 05ed77e on the other, then on each:
On the c8213f8 clone, I get
and on the 05ed77e clone,
|
Great detective work. But it's very confusing that the bundler caused this! Are you able to profile and see which function is actually causing the slowdown? |
Here's the Earlier I tried building the latest Edit: When I say 'without Vite', I mean I did some pretty unspeakable things to the repo in order to revert the build system change. I'm quite out of my depth here. 😆 |
Very interesting! I wonder if it has something to do with the |
Hi,
I opened #4429 over at LaTeX Workshop regarding significant performance issues with AST parsing. From my experiments it looks like
\newenvironment
in particular is able to cause these problems. I was told to come here because unified-latex is used by LaTeX Workshop for parsing. The details are all in the linked issue, including a simple example. As I wrote in that issue, I would be happy to privately share a short document which takes upwards of a minute to parse if this would be useful.Thanks :)
The text was updated successfully, but these errors were encountered: