RhoInc / Webcharts

Reusable, flexible, interactive charts with JavaScript
MIT License
34 stars 6 forks source link

Section of Code in Tables Draw Slowing Performance #217

Closed pburnsdata closed 5 years ago

pburnsdata commented 5 years ago

Currently a section of the tables Draw code is causing slow performance in crf heat map. Row 143 in particular seems to be the offender. See more here

pburnsdata commented 5 years ago

@samussiah @jwildfire I wonder if the main reason this is so painful is because we're getting the widths and using them in the same callback. They are probably all jumbled up with each other. If we separated them, maybe it wouldn't be so bad?

pburnsdata commented 5 years ago

Aye! I moved the width calculation into onLayout and the forced reflow stuff went from ~50 secs to <3 secs. That's still slow though for the web, there might be some helpful things out there - this looks interesting: https://github.com/wilsonpage/fastdom.

This also might just be because the table doesn't have all the cells in Layout (I think) and so reflow isn't as bad.