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

Large tables generation speedup #137

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cervinka
Copy link

Generating large tables (more than thousands of rows) takes a very long time.

I looked at the internal Sheet implementation and tried to rewrite it from a list of lists to a map of maps.

The result was a drastic speedup in generating large tables:

number of rows current implementation new implementation speedup
10k rows 16s 0.7s ~23x
30k rows 154s 2.4s ~64x
50k rows 448s 2.7s ~166x
100k rows 1716s 5.7s ~301x
1M rows didn't wait :-) 65.7s ?

(unscientific time measurement of generating tables with a given number of rows and 10 columns)

All my tests and use cases work with the new implementation, but it would definitely take more testing. Please don't take the pull request as final yet. I just want to make sure at this point that you would be interested in the modification and would consider including it in the main branch.

Anyone is of course welcome to test on generating their own data.

@xou xou force-pushed the master branch 3 times, most recently from e7bdfd0 to 68acd8d Compare January 28, 2024 16:00
@xou
Copy link
Owner

xou commented Jan 29, 2024

Thank you so much, this looks really great.
I'd love to merge this, I intend to extend the test coverage in the upcoming weeks and will then have another look into merging this!

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.

None yet

2 participants