n3m3sis00 / phylo-react

React component library for Phylogenetic Analysis
https://n3m3sis00.github.io/phylo-react/
1 stars 1 forks source link

MSA rendering is very resource intensive[For huge tree/Sequences] browser crashes #42

Open n3m3sis00 opened 3 years ago

n3m3sis00 commented 3 years ago

FIX:

Edit: Without color MSA renders smoothly : https://n3m3sis00.github.io/phylo-demo/ [on this click EnsemblDemo No Color]

cmdcolin commented 3 years ago

This might suggest the need to use something such as HTML5 canvas for the MSA also. Large sequences do indeed end up producing a lot of nodes

n3m3sis00 commented 3 years ago

This might suggest the need to use something such as HTML5 canvas for the MSA also. Large sequences do indeed end up producing a lot of nodes

Yes we can introduce html canvas, what I was thinking of using a GPU accelerated library(like Three.js) as well.

cmdcolin commented 3 years ago

Canvas should be fast enough and canvas is GPU accelerated in most browsers such as chrome. Canvas just doesn't use webgl, which three.js does

cmdcolin commented 3 years ago

Also, just to be clear about what causes the slowdown, it is large numbers of DOM nodes. Browsers cannot handle tens of thousands of DOM nodes basically. Canvas just "draw" rather than render to DOM nodes so this is why they are faster.

n3m3sis00 commented 3 years ago

what causes the slowdown, it is large numbers of DOM nodes.

Yes exactly

n3m3sis00 commented 3 years ago

I Will try to port Current MSA component to Canvas

cmdcolin commented 3 years ago

Sounds good:)