Skip to content

Add caching for DataTable._get_row_renderables() #5959

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fancidev
Copy link

@fancidev fancidev commented Jul 12, 2025

The DataTable widget appears slow to load and scroll when the number of columns is large. This PR improves the situation by adding a cache for the _get_row_renderables() method, which is called $O(m^2)$ times for each rendered row where $m$ is the number of columns. This speeds up the execution of certain benchmarks by 50x.

More details (including a benchmark script) can be found at Discussion #5953.

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

Successfully merging this pull request may close these issues.

1 participant