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

Clear buf #320

Merged
merged 2 commits into from
Aug 24, 2023
Merged

Clear buf #320

merged 2 commits into from
Aug 24, 2023

Conversation

rsheeter
Copy link
Collaborator

https://docs.rs/quick-xml/latest/quick_xml/reader/struct.Reader.html suggests "if we don't keep a borrow elsewhere, we can clear the buffer to keep memory usage low." We build data structures with copies so as far as I can tell we can clear buf in all the read event into loops.

While we're here, add magic incantation to Cargo.toml make cargo bench -- --save-benchmark work so one can compare against a baseline taken on master. $ cargo bench -- --baseline master generally tells me things are more better than worse. The results of reruns are not stunningly consistent but it mostly tells me a couple of things are faster and occasionally that one is slower.

Feel free to close as not convincing enough or merge as you see fit :)

image

Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good modulo the clippy complaints :)

@rsheeter rsheeter merged commit 41d7826 into master Aug 24, 2023
4 checks passed
@rsheeter rsheeter deleted the meh branch August 24, 2023 18:16
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