Skip to content

[Sad Catapella B4][Performance] Mask-looking filename ownership checks scale quadratically with image count #84

Open

Description

@guijacquemet

Baseline and classification

Sad Catapella Batch 4, commit d7a538e56d41ac1093ba79adcad397c21b3dfd32. Confirmed asymptotic repeated work, speed magnitude not measured.

Evidence

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions