Skip to content

perf: subset unmixing prior to listing#6

Merged
robin-cls merged 5 commits into
mainfrom
refactorize_subsets
May 7, 2026
Merged

perf: subset unmixing prior to listing#6
robin-cls merged 5 commits into
mainfrom
refactorize_subsets

Conversation

@robin-cls
Copy link
Copy Markdown
Collaborator

@robin-cls robin-cls commented May 7, 2026

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:

  • A flat layout
  • Files organized differently from the declared Layouts
  • Layouts disabled

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.

@robin-cls robin-cls merged commit 7fdadf6 into main May 7, 2026
7 checks passed
@robin-cls robin-cls deleted the refactorize_subsets branch May 7, 2026 14:06
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