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

ProcessedEventData: delay allocation until first event. #342

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

jmaxson-ms
Copy link
Contributor

@jmaxson-ms jmaxson-ms commented Jan 19, 2024

If a data cooker is using this class and never processes any events from the trace, then performing an initial allocation is a waste of memory.

This change delays that initial allocation until the first event is received.

I tested with an existing XPerf cooker (EtwSessionInfo) to be sure that it works as expected.

This change is important because the more data cookers use this class, the higher the initial allocation cost would become.

@jmaxson-ms jmaxson-ms merged commit 8069585 into main Feb 21, 2024
2 checks passed
@jmaxson-ms jmaxson-ms deleted the user/jmaxson/processedEventDataAllocationDelay branch February 21, 2024 21:06
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.

3 participants