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

perf: Improve performance of lots of grids in a dashboard #1987

Merged
merged 2 commits into from
May 9, 2024

Conversation

mofojed
Copy link
Member

@mofojed mofojed commented May 3, 2024

  • Each GridRenderer had an independent cache for checking various colour operations, instead use a shared cache
    • Grids are likely to share the same colours because they have similar themes anyway
  • Improves performance when opening dashboards with lots of grids

- Each GridRenderer had an independent cache for checking various colour operations, instead use a shared cache
  - Grids are likely to share the same colours because they have similar themes anyway
- Improves performance when opening dashboards with lots of grids
@mofojed mofojed requested review from vbabich and mattrunyon May 3, 2024 21:25
@mofojed mofojed self-assigned this May 3, 2024
@dsmmcken
Copy link
Contributor

dsmmcken commented May 6, 2024

Another idea I've had is making a shared cache for every measure text call. The cache would need to be keyed on both the current context.font + string being measured, but tables frequently repeat values internally and across tables, and measureText is rather expensive.

packages/grid/src/GridRenderer.ts Outdated Show resolved Hide resolved
@mofojed mofojed requested a review from mattrunyon May 9, 2024 15:17
@mofojed mofojed merged commit 3de52d6 into deephaven:main May 9, 2024
9 checks passed
@mofojed mofojed deleted the fix-laggy-dashboard branch May 9, 2024 17:36
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants