Skip to content

Improve the memory pressure of the pretty-printing functions - #31

Draft
kit-ty-kate wants to merge 1 commit into
hannesm:mainfrom
kit-ty-kate:improve-mem-pressure
Draft

Improve the memory pressure of the pretty-printing functions#31
kit-ty-kate wants to merge 1 commit into
hannesm:mainfrom
kit-ty-kate:improve-mem-pressure

Conversation

@kit-ty-kate

Copy link
Copy Markdown
Collaborator

Patch.pp etc. have some issues on machines with limited amount of memory printing large patches where our implementation over-allocates a lot of memory for nothing and spends a non-negligible amount of time resizing and copying buffers around.

This PR improves this by making these functions essentially allocation-free (if users provide a preallocated formatter).

I'm not too happy about pp_filename.to_quote so this stays a draft for now until i'm able to benchmark it correctly.

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.

1 participant