-
Notifications
You must be signed in to change notification settings - Fork 634
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Internal refactor of TreeFS._lookupByNormalPath (collectLinkPaths) (#…
…1276) Summary: This is a light refactoring of a private method to clear the way for subsequent diffs. In `TreeFS._lookupByNormalPath`, rather than returning a list of project-relative traversed symlink paths, we accept an optional `Set<string>` into which we write absolute paths. This is more ergonomic and performant for callers that repeatedly call `_lookupByNormalPath` (the upcoming `hierarchicalLookup`) and want to aggregate the paths that could invalidate its result (for incremental resolution) - we save instantiating a new array and then copying its contents into an aggregate set for each call. Additionally, `_lookupByNormalPath` can perform the normal->absolute path conversion (which is cheap but not free) only if `collectLinkPaths` is given. Changelog: Internal Differential Revision: D57844055
- Loading branch information
1 parent
a749a9c
commit 8ac9ec8
Showing
1 changed file
with
17 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters