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

trace and first step in performance #44

Merged
merged 5 commits into from
Aug 10, 2023
Merged

trace and first step in performance #44

merged 5 commits into from
Aug 10, 2023

Conversation

rnwgnr
Copy link
Contributor

@rnwgnr rnwgnr commented Aug 9, 2023

This PR adds a simple function to trace the time spend in code sections. It can be enabled by setting trace=1 when launching astro and will create a trace file in astro's cache dir.

Additionally the rendering of links has been modified to remove character replacement via sed which improves performance of link rendering a lot.

rnwgnr added 5 commits August 6, 2023 19:12
This reduces the time of rendering geminispace.info/known-hosts (~2200 links on this page by the time of
writing) to half (~24secs to 12secs on my testmachine).
@blmayer
Copy link
Owner

blmayer commented Aug 9, 2023

Cool. One question: Does adding this code decreases performance even with trace=""?

I'm thinking in creating a test version of the astro file with all the debugging stuff, so the main file is much cleaner. What do you think?

@blmayer
Copy link
Owner

blmayer commented Aug 9, 2023

But that could be done in another time If don't want to change this PR.

@rnwgnr
Copy link
Contributor Author

rnwgnr commented Aug 10, 2023

Does adding this code decreases performance even with trace=""

The difference may be measurable but for sure not something that has a remarkable impact of the overall performance. We essentially have an additional function call and a check, pretty much the same we have for the "debug" calls. This would add fractions of milliseconds.

@blmayer
Copy link
Owner

blmayer commented Aug 10, 2023

All right. Thanks for working on this.

@blmayer blmayer merged commit 5bc99d1 into blmayer:main Aug 10, 2023
@rnwgnr
Copy link
Contributor Author

rnwgnr commented Aug 13, 2023

The change introduces issues on some capsules when interpreting link lines. I will look into it and try to fix this.

@rnwgnr rnwgnr deleted the trace branch August 27, 2023 07:04
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

Successfully merging this pull request may close these issues.

2 participants