wavedrom / zoom

🔍 Zoomable Waveform viewer for the Web
MIT License
43 stars 1 forks source link

Fast rendering #3

Open drom opened 5 years ago

drom commented 5 years ago

Timing diagram ( part of #5 ) can be constructed in vector form, but then need to be rendered into pixel accurate form to be useful.

Possible options:

Maps or 2D gaming rendering engines can be a good source of inspiration

drom commented 5 years ago

from: @DrSensor #1

For fast rendering, how about using different implementation depend on the density of the data? For example, use SVG when there are fewer lines to be rendered and switch to WebGL if there is a huge amount of lines.

drom commented 5 years ago

My current ideas about Fast rendering: 1) divide all diagram into rectangular tiles 2) first, render the tiles included into viewfinder [ #11 ] 3) then render the tiles around for faster scroll/zoom [ #2 ] 4) keep the LRU cache of pre-rendered tiles

Tile rendering: 1) create a set of useful building blocks (skin) SVG -> raster 2) compose bigger blocks by hierarchical rectangle copy process. 3) render tiles from the hierarchy of building blocks.

drom commented 5 years ago

Sources of inspiration:

Rendering in Web workers: