Closed jmaxson-ms closed 9 months ago
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.
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.