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

parsing performance worsened #6734

Closed
svigerske opened this issue Jan 3, 2019 · 10 comments
Closed

parsing performance worsened #6734

svigerske opened this issue Jan 3, 2019 · 10 comments

Comments

@svigerske
Copy link

With larger .dox files, the time to parse the file seems to have increased considerably between Doxygen 1.8.14 and 1.8.15.

With the 100KB .dox file in datalib.dox.zip, I get with doxygen 1.8.14:

real	0m0.169s
user	0m0.133s
sys	0m0.027s

But with doxygen 1.8.15 this becomes:

real	0m1.333s
user	0m1.300s
sys	0m0.026s

On another 490KB file (similar structure), time even increases from 0.9 seconds to 112 seconds.

@albert-github albert-github added the needinfo reported bug is incomplete, please add additional info label Jan 3, 2019
@albert-github
Copy link
Collaborator

Please include your Doxyfile as well as I get:

warning: Found unknown command ``\gmscodeinclude'

also run with -d time (so doxygen -d time Doxyfile and of course QUIET=NO) and include the resulting, terminal, output for 1.8.14 and 1.8.15.

@svigerske
Copy link
Author

Well, I was running with an empty Doxyfile, ignored all warnings, and could see that most time is spend on the "Parsing file..." line.

But here a directory with .dox file (with \gmscodeinclude removed), Doxyfile, and the logs from 1.8.14 and 1.8.15: bigdox.zip

1.8.14 says

Spent 0.057 seconds in Parsing files

1.8.15 says

Spent 1.071 seconds in Parsing files

@albert-github albert-github removed the needinfo reported bug is incomplete, please add additional info label Jan 3, 2019
@mosra
Copy link
Contributor

mosra commented Jan 3, 2019

Possibly related: while reporting #6715 I noticed that #6592 (commit 07ae32a) increases the resulting Doxygen binary size by 200 kB in Release build (or, conversely, if I revert that commit to work around the bug, Doxygen installation shrinks by 200 kB). That sounds like a lot for a seemingly simple parser change and I suspect this might have some measurable perf impact.

@albert-github
Copy link
Collaborator

I just did a quick check and reverted the #6592 patch (was easy as it were only 2 lines changed without interactions in this case) and the timing stayed at the same high level.
Looking with -d time -d lex I saw that in the mentioned part the commentscan.l is called, so this lexer or a function called by it is a more likely candidate.

@albert-github
Copy link
Collaborator

Change in time is a result of the improvement of the markdown processing in #674, the markdown processor is now at a better place and more logical place.

@doxygen
Copy link
Owner

doxygen commented Jan 5, 2019

The move of the markdown processing does not yet explain the increased total running time (markdown is also done in the 1.8.14 version). So it is good to do some code profiling.

@albert-github
Copy link
Collaborator

I see a lot of pages (by head over 120) in the "bigdox" case and it looks like they are fed one by one to markdown processor.
Might some startup of the markdown processor / caching cause the problem? or maybe the "entry" handling (marshalling)?
I looked at the direct differences in the markdown processor but could not find a direct cause.

doxygen added a commit that referenced this issue Jan 7, 2019
@doxygen
Copy link
Owner

doxygen commented Jan 7, 2019

In this commit c61d870 I've moved the markdown processing out of the parseCommentBlock() loop, which should bring the performance back to the 1.8.14 level.

@doxygen doxygen added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Jan 7, 2019
@doxygen
Copy link
Owner

doxygen commented Aug 8, 2019

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.8.16.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Aug 8, 2019
@doxygen doxygen closed this as completed Aug 8, 2019
@svigerske
Copy link
Author

Looks good. With 1.8.16 for the datalib.dox file posed at the beginning I am now back to

real	0m0.175s
user	0m0.092s
sys	0m0.031s

Thank you!

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

4 participants