You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
images_named_as_masks() lines 529–539 invokes _mask_owner() lines 564–583 for each eligible image; _mask_owner reconstructs keys by scanning every stem in the experiment, so ordinary N-image datasets incur O(N²) prefix comparisons. Mask-like folder checks add further calls.
The ownership rule is longest matching position name, prefer same folder, which must remain deterministic and unchanged.
Optimization acceptance
Use direct candidate lookups from known suffixes for default mask-name detection; for wildcard ownership in a masks-like folder, use a prefix trie or a carefully indexed prefix search to find the longest valid name, retaining same-folder priority. Reuse the case-normalized stem/position index once; avoid repeated position_id and PurePosixPath construction. Benchmark 1k/10k/100k positions, long shared prefixes, multiple extensions, cross-condition identical stems and worst-case mask-like names. Assert identical warnings and owner references against the existing algorithm on an independent fixture. No Numba: Python indexing is the right tool.
Activity