Closed rnwgnr closed 1 year ago
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?
But that could be done in another time If don't want to change this PR.
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.
All right. Thanks for working on this.
The change introduces issues on some capsules when interpreting link lines. I will look into it and try to fix this.
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.