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

Optimized based on output from profiler on large sheets #112

Conversation

torerefsnes
Copy link

I ran across a performance issue with large spreadsheets, and investigated this using the YourKit profiler.

Two bottlenecks that could be addressed were identified: one is heavy use of a regexp in a function used to split a cell reference string, and the other because of unnecessary formatting of a value, where the formatting could be deferred until if/when the value was actually used.

With my set of files, total processing time went from 944 to 525 seconds with these changes included.

Note to reviewer: the change from regexp to a simplified method when splitting the cell reference works for all tests in the project, and on my testset. If I missed a format that could occur here, please let me know and I will add tests and update the code.

Verified

This commit was signed with the committer’s verified signature.
phutchins Philip Hutchins
@monitorjbl
Copy link
Owner

Interesting, will have to confirm after merging. Regardless, deferring the cost of number parsing until they're used seems like a good idea.

@monitorjbl monitorjbl merged commit 3e0ff13 into monitorjbl:master Sep 30, 2017
@monitorjbl
Copy link
Owner

I'm not seeing the massive improvement you did with my 250k row test sheet. It is roughly 10% faster, so there's definitely an improvement but it's not nearly as marked as what you saw.

@torerefsnes
Copy link
Author

If you’re interested, I’ll make my test set available.

@monitorjbl
Copy link
Owner

If it's not private data, that would be very helpful

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

3 participants