Bug 213945 Comment 201 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

It may help you looking at the experimental implementation I attached to this bug five years ago. It is a pure HTML implementation, and works fine with an unlimited number of lines. The footprint of this implementation is constant. 

The trick is just to use a view port with fixed height Elements. This allows sliding the elements inside the view ports and combine this with a simple caching strategy. The addon just at maximum cached 50% of the number visible elements in either direction. Which means if 25 Elements where displayed the HTML ended up with at most 50 Elements. The fixed height means you can easily calculate the visible elements. 

It as was poor mans implementation without any optimization so there is plenty of room left (e.g. by using a canvas or webGL as context).
It may help you looking at the experimental implementation I attached to this bug five years ago. It is a pure HTML implementation, and works fine with an unlimited number of lines. The footprint of this implementation is constant. 

The trick is just to use a view port with fixed height Elements. This allows sliding the elements inside the view ports and combine this with a simple caching strategy. The addon just at maximum cached 50% of the visible elements in either direction. Which means if 25 Elements where displayed the HTML ended up with at most 50 Elements. The fixed height means you can easily calculate the visible elements. 

It as was poor mans implementation without any optimization so there is plenty of room left (e.g. by using a canvas or webGL as context).

Back to Bug 213945 Comment 201