]> git.cworth.org Git - vogl/commit
UI: Fix unnecessary memory overhead when loading traces.
authorPeter Lohrmann <plohrmann@upsamplesoftware.com>
Fri, 14 Mar 2014 20:43:22 +0000 (13:43 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 1 Apr 2014 19:37:28 +0000 (12:37 -0700)
commit70c39f838937ede08c56c813f0cb6a26372949d0
treef32749b71c88af17f9d0efc65548e3e40d3b8bb7
parent3c0003252364822639ce04535f221120f09b56a1
UI: Fix unnecessary memory overhead when loading traces.
* A vogl_trace_packet can have lots of memory associated with it, so they should not be copied or assigned if it can be avoided. In this case, the loading was using a single trace packet instance to load the data from disk, then the packet was being copied into its associated node in the API call tree. This assignment / copy was temporarily (and unnecessarily) doubling the size of the packet, requiring extra memory allocations, and generally just causing excessive overhead. Instead, allocate a separate vogl_trace_packet for each packet that needs to be loaded from disk, and pass that memory off the apiCallItem for management. This greatly improves load times and allows us to load traces that would previously fail due to memory limitations.
* Also move a few allocations over to using vogl_new and vogl_delete so that vogl can track the memory usage.

(cherry picked from commit 1bcaf8bd911c1b1604e59898c752506be1394c38)
src/vogleditor/vogleditor_apicallitem.h
src/vogleditor/vogleditor_frameitem.h
src/vogleditor/vogleditor_qapicalltreemodel.cpp