Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slow table #7404

Closed
scottdraves opened this issue May 22, 2018 · 3 comments
Closed

slow table #7404

scottdraves opened this issue May 22, 2018 · 3 comments
Assignees

Comments

@scottdraves
Copy link
Contributor

scottdraves commented May 22, 2018

in the LoD tutorial doc/groovy/LevelsOfDetails.ipynb, in the first cell, remove the HIDDEN value so the table is displayed. it is rather slow, it seems the wide column limit is not kicking in.

@MariuszJurowicz
Copy link
Contributor

MariuszJurowicz commented Jun 25, 2018

@scottdraves
The problem is caused by using the fillText canvas API method on every scroll or repaint call of DataGrid.
As this example renders the really big Array (10000 items) as string that has about 32000px width when rendered. To fix this performance issue we can cache the rendered value as image and use it on every repaint call (similarly to HTML renderer). You can see the performance boost when setting the format to html.

@scottdraves
Copy link
Contributor Author

OK but why didn't the wide column limit kick in? Anything more than 1000 chars should be truncated.
See the last example in https://github.com/twosigma/beakerx/blob/master/doc/groovy/BigTable.ipynb

@MariuszJurowicz
Copy link
Contributor

MariuszJurowicz commented Jun 27, 2018

The reason the value wasn't truncated is that the value here was treated as Object (as it is the Array of 10000 items) and stringified.
But only the String values were truncated not the object ones. I've created PR that forces the String formatter to also truncate the stringified object values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants