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

Reduce memory footprint of artifact debug info #6946

Open
TomAFrench opened this issue Jan 5, 2025 · 0 comments · May be fixed by #7034
Open

Reduce memory footprint of artifact debug info #6946

TomAFrench opened this issue Jan 5, 2025 · 0 comments · May be fixed by #7034
Assignees

Comments

@TomAFrench
Copy link
Member

We recently heavily reduced the memory consumption of the callstack representation within the compiler however once compilation is complete we then use the old inefficient representation of the callstacks.

pub locations: BTreeMap<OpcodeLocation, Vec<Location>>,
pub brillig_locations:
BTreeMap<BrilligFunctionId, BTreeMap<BrilligOpcodeLocation, Vec<Location>>>,

If we pull up the memory flamegraph of executing rollup-base-public with a cached artifact, we can then see that 96% of the peak memory usage comes from just deserializing the program artifact. Of this 1.6GB (52.6%) comes from the debug info as opposed to 1.3GB of actual bytecode (43.6%).

Image

We should perform a similar optimization to the debug data stored in the program artifacts to minimise their memory footprint.

@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Jan 5, 2025
@guipublic guipublic self-assigned this Jan 6, 2025
@guipublic guipublic linked a pull request Jan 13, 2025 that will close this issue
5 tasks
@TomAFrench TomAFrench moved this from 📋 Backlog to 🏗 In progress in Noir Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

2 participants