perf: subset unmixing prior to listing#6
Merged
Merged
Conversation
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 tries to improve the subset unmixing feature. The main objective is to try and test if the subset selection can be done prior to listing the files. This is possible if there are folders containing the subset information. The main advantage of this approach is an error is returned way faster in case subset filters are missing. The second advantage is that giving the subset filters will reduce the number of parsed file, potentially gaining some time in the metadata extraction.
We also introduced a PerformanceWarning in place of the previous UserWarning. This warning is emitted when calling the filter_values method in a sub-optimal configuration, namely:
For the first case, the warning was not emitted prior this PR. We chose to emit it anyway because files not organized in folders are indeed a performance issue if there are too many. For small subsets, the performance issue is reduced and the warnings can be ignored, so we added an example for silencing the warnings in the documentation.
Also, the subset unmixer auto pick keys do not accept a transform. This case was linked to a specific type of non-sortable keys (L2_LR_SSH crid) which is now sortable. It is preferrable to specify simple strings for the keys, and assume that the associated values are sortable.