dso-quad-logic icon indicating copy to clipboard operation
dso-quad-logic copied to clipboard

Implement tree data structure for signal storage

Open PetteriAimonen opened this issue 11 years ago • 0 comments

Currently the code slows down when the screen is zoomed out. This is because it needs to go through all the stored events in order to draw them.

To speed this up, a multi-level tree-like data structure could be used. Each tree node would contain info about length and signal levels. It could be for example "500µs, signals 1,2,3 are 0, signal 4 is switching between 0 and 1." Nodes will have signals that are "both 0 and 1", while leafs will only have single states.

This structure will facilitate fast drawing (no need to descent into leafs if the state is constant or the node length is less than 1 pixel). It will also allow compression by searching for similar nodes and replacing them with the same pointer.

PetteriAimonen avatar Nov 01 '12 17:11 PetteriAimonen