You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repro: run just py-build && examples/clock/main.py --steps 250000
A lot of time is spent by the time panel to view all the data points.
The problem is that all the logged times are stored in a BTreeSet<TimeInt> which is iterated through each frame (because who knows, it might have changed since last frame).
One solution is to replace that BTreeSet with a custom hierarchial data structure where we can stop recursion when we reach some limit informed by the current zoom level, e.g. stop recursing once we reach a node that span a time that takes up less than one pixel in the time panel view. There we just summarize the children with their time span and count.
The data structure would probably be something similar to a B-tree, but we can make a lot of simplifications based on the content being POD, and that the only mutating operations is insert and trim (remove everything before time T, for memory pruning).
The primary query we need to support is to iterate through all the datapoints, but taking strides that have some fixed width (e.g. 5s).
EDIT: I have a nice idea for how to do this now, without too much work. Will perhaps work on it on the plane next week.
The text was updated successfully, but these errors were encountered:
Repro: run
just py-build && examples/clock/main.py --steps 250000
A lot of time is spent by the time panel to view all the data points.
The problem is that all the logged times are stored in a
BTreeSet<TimeInt>
which is iterated through each frame (because who knows, it might have changed since last frame).One solution is to replace that
BTreeSet
with a custom hierarchial data structure where we can stop recursion when we reach some limit informed by the current zoom level, e.g. stop recursing once we reach a node that span a time that takes up less than one pixel in the time panel view. There we just summarize the children with their time span and count.The data structure would probably be something similar to a B-tree, but we can make a lot of simplifications based on the content being POD, and that the only mutating operations is insert and trim (remove everything before time T, for memory pruning).
The primary query we need to support is to iterate through all the datapoints, but taking strides that have some fixed width (e.g. 5s).
EDIT: I have a nice idea for how to do this now, without too much work. Will perhaps work on it on the plane next week.
The text was updated successfully, but these errors were encountered: