Page MenuHomeSoftware Heritage

Cache directory entries to make readdir/lookup more efficient
Closed, MigratedEdits Locked

Event Timeline

haltode triaged this task as Normal priority.Oct 13 2020, 12:12 PM
haltode created this task.
haltode created this object in space S1 Public.

lookup() should ideally be O(1).

From the design doc:

	### Dentry cache
	
	    dir SWHID → directory entries
	
	The dentry (directory entry) cache map SWHIDs of type `dir` to the directory
	entries they contain. Each entry comes with its name as well as file attributes
	(i.e., all its needed to perform a detailed directory listing).
	
	Additional attributes of each directory entry should be looked up on a entry by
	entry basis, possibly hitting the metadata cache.
	
	The dentry cache for a given dir is populated, at the latest, when the content
	of the directory is listed. More aggressive prefetching might happen. For
	instance, when first opening a dir a recursive listing of it can be retrieved
	from the remote backend and used to recursively populate the dentry cache for
	all (transitive) sub-directories.

Might not be implemented as entries inside the sqlite disk cache but probably in-memory inside FuseEntry class.

haltode changed the task status from Open to Work in Progress.Oct 23 2020, 2:03 PM
haltode moved this task from Backlog to In progress on the Software Heritage filesystem board.