ctf: improve scope creation #344
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it does
Speeds up trace reading by ~5-10%. The concurrent hashmap was used to avoid contention. But the data inputted is stable. The data is first written, then read, never both at the same time. A will always produce B. So we can use a normal hashmap. Streaming CTF live would still read all the metadata and pause the trace reading when the metadata is updated. The lock is implicit.
How to test
Open a trace with enums that are wide (1000 keys).
Follow-ups
Review checklist