Skip to content

From PR #104: Performance Issue + Name collision handling#118

Description

@erezh16

馃煛 MEDIUM SEVERITY - Performance Issue

The lookup_by_name() method performs a linear O(n) scan through all UUID directories, reading and parsing each manifest file. This will significantly degrade performance as resources grow.

Recommendation:
Implement a name-to-UUID index/cache:

  1. In-memory dictionary maintained by ResourceHandler
  2. Separate index file (name -> UUID mapping)
  3. Integration with existing Description index system

This would reduce lookups from O(n) to O(1).

馃煛 MEDIUM SEVERITY - Name Collision Handling

The lookup_by_name() returns the first match found, but directory iteration order is not guaranteed. This leads to non-deterministic behavior when multiple resources share the same name.

Recommendation:
Either:

  1. Enforce unique names at creation time
  2. Document that name-based lookup may return arbitrary results for duplicates
  3. Return an error when duplicates exist, forcing UUID-based access

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions