-
Notifications
You must be signed in to change notification settings - Fork 3
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
Optimize performance in case of local links #219
Comments
Note: as far as I understand it correctly, making IO concurrent does not make much sense. But if pure logic takes a decent amount of time, it should be parallelized. |
I tried 0.13s turned out to be consumed for files traversal, 0.08s on scanning, so looks like the most portion of time is consumed by verification. And I'm not sure how can this be, it is mostly pure code if we exclude external links checks 🤔 |
IMHO, this proportion of time may be result of laziness (so it reported about finishing scan before e.g. all anchors were parsed) |
Ah yes, I first measured it incorrectly but then remembered the need in running some |
I tried profiling this in a free time, and if I interpret the results correctly, we really have something to optimize in the verification logic. I have run on Morley repository with (I also had I get approximately the same flamegraph if focusing on memory, not time. I believe, something like this is fully expected, given that we brought proper handling of filepaths comparison just recently. Looks like in both fat places,
This is basically what #197 is about. |
Also we can try to use |
Yep, good note. I think we could go even further. Comparing on simple |
Let's do this right after #230 (otherwise we will get severe merge conflicts, and after that PR introducing |
We can just compare reversed paths 😄 |
Yep, this should quite work 😸 |
I have tried to generate the same flame graph after #230, if I am not wrong with the repository under the test (https://gitlab.com/morley-framework/morley), and also running It seems that this time verification has been slightly less than half of the running time. These are the runtime statistics im my case, with a no profiling build from the master branch:
|
I have tried again with the changes made by the #263 PR, and both memory usage and overall execution time have been improved:
|
😮 Nice to see that! |
I tried to run the recent version of Looking at the flamegraph you provided, I found it suspicious that I'm personally satisfied with what we already have, so I suggest leaving #272 for future work (not in 0.3.0 milestone), and only:
And then close this ticket if we observe no significant regress. |
Clarification and motivation
One use case that I wanted to see very fast - running xrefcheck on local links only. So that as a user, I could have a very responsive "verify >> edit" loop.
However, currently it seems to take quite long.
Acceptance criteria
The text was updated successfully, but these errors were encountered: