gosling-lang / gosling.js

Grammar of Scalable Linked Interactive Nucleotide Graphics

Home Page:https://gosling.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rendering performance

dvmoritzschoefl opened this issue · comments

For certain tracks the performance is not good enough to ensure a smooth scrolling & panning experience. I think it is partly because the Pixi.js graphics object is cleared everytime instead of reusing the geometry. There are also patterns which copy the underlying data arrays multiple times (see the filter and map operations in the point mark renderer). We experienced this when using the "point" mark with json data (~500 - 1000 points) but it can also be observed in the gosling examples like this one

https://gosling.js.org/?example=CORCES_ET_AL

Hi @dvmoritzschoefl,

Thank you for bringing this to our attention. We've been working to improve the rendering performance and have begun to reduce redundant spec and data manipulation events which should be released shortly (see #988). I can ping you it merged and released. This should help large json data especially.

I think it is partly because the Pixi.js graphics object is cleared everytime instead of reusing the geometry

That is absolutely right, and significant performance gains would be made by reusing the geometry! Some further thoughts here: #50. This will be a major overhaul but I believe the performance gains will be worth it. This will likely be the next Gosling rendering related improvement I will make.