[freqtbl-] only start new threads for large or complex bins#3050
Open
midichef wants to merge 1 commit intosaulpw:developfrom
Open
[freqtbl-] only start new threads for large or complex bins#3050midichef wants to merge 1 commit intosaulpw:developfrom
midichef wants to merge 1 commit intosaulpw:developfrom
Conversation
Gives a 5x speedup on sheets that contain only small bins. Introduces new sheet parameter select_is_quick that should be set to True for sheets where selecting is a slow operation, so that selection can be paused to update the display.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a draft/prototype for consideration.
On a FreqTableSheet with lots of small bins, like you get from:
seq 111222 |vd -thenF, mass selection events likegsor,are 5x slower than they could be.FreqTableSheet selection is slow, because every bin selection starts a new thread. For small bins, the thread startup time dominates the bin processing time. This PR skips starting a new thread for small bins with < 100 elements, since they'll be handled quickly enough to preserve interactivity. On my old system, Python 3.10, it gives a 5x speedup for
gson sheets that have only small bins.What do you think? It's not elegant, and this implementation using
select_is_quickis definitely ugly, but 5x is quite a lot.