-
Notifications
You must be signed in to change notification settings - Fork 114
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
Share BytesStart
s across frames in flamegraph
#41
Comments
FYI, I have opened a PR in quick-xml repo tafia/quick-xml#149 to fix tafia/quick-xml#148 |
Now that tafia/quick-xml#149 has landed, this should be easy-peasy! :D |
Well we just need to wait for a quick-xml release now. |
@meven I would start working with |
Having a look unfortunately |
Ah, that's unfortunate. The |
On the other hand, So if instead you decide to use I haven't tried it on your code but it should work. |
This saves us some allocations on every frame and fixes #41.
We should also do this for the |
BytesStart
across g
s in flamegraphBytesStart
s across frames in flamegraph
I would probably work on this on top of #32 rather than current |
Good suggestion, I can do that. |
While #37 got us pretty far, there is still one source of allocation in the main flamegraph loop: the attributes on
BytesStart
. Specifically, when you add attributes to aBytesStart
, it allocates aVec
to hold the underlying bytes if it doesn't already have aVec
. That's unfortunate since we create a newBytesStart
for everyg
. If we instead created a singleBytesStart
that we re-used somehow (by resetting all the attributes), that'd be way more efficient. Sadly, that's not yet supported, but I've filed tafia/quick-xml#148 which would enable us to do that!The text was updated successfully, but these errors were encountered: