ValveSoftware/vogl — pull request #27 by PeterLValve (2014-03-19 18:41:44+00:00)
Title: UI: Fix issue #21: Resizing of vogleditor window is slow depending on trace size

* If the window is only being resized a small amount (within 20%), the timeline will no longer redraw and simply gets stretched.
* When the timeline is redrawn, it will now only draw one timeline item per pixel instead of many sub-pixel items.
* Fixed an issue that caused 0-duration items from being scaled to 1 instead of the horizontal scale value (which should be the minimum amount of time needed to appear as a single pixel). This greatly reduced the number of items being drawn.
* Fixed deletion of timeline item children.

* These improvements reduced the number of drawn items in one particular trace file from ~5.9 million, down to ~1250 in the default window size. When I stretched the editor across two monitors (giving the timeline more pixels to draw into) this increased to ~4500 items - both very reasonable numbers.

This code will likely need to be revisited in the future once we actually utilize the timeline items having children, when we add more hierarchy to the API call tree, using: string markers, glBegin/glEnd, display list construction, etc