Page MenuHomeSoftware Heritage

FUSE: lookup: add optional regex pre-condition
Closed, MigratedEdits Locked

Description

We should define an optional regex check in lookup to allow fast result for directories with specific entry formats (eg: archive, origin, history/by-date, etc.). This allow to bypass the O(N) loop for obvious wrong query.

One particular use case for this would be to prevent slowness when zsh is looking for .git/ entries in every parent directory.

Event Timeline

haltode triaged this task as Normal priority.Dec 8 2020, 11:55 AM
haltode created this task.
haltode created this object in space S1 Public.

My API idea was to simply have something like ENTRIES_REGEXP = r'^.*:.*$' as a class attribute of each type of directory, and a validate_entry(self, name: str) method which, by default, just checks that it matches the regexp.

haltode changed the task status from Open to Work in Progress.Dec 8 2020, 4:41 PM
haltode moved this task from Backlog to In progress on the Software Heritage filesystem board.