Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolver perf: Use hierarchicalLookup for closestPackage (3/n) #1283

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Jun 4, 2024

  1. Internal refactor of TreeFS._lookupByNormalPath (collectLinkPaths) (f…

    …acebook#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
    robhogan authored and facebook-github-bot committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    8576566 View commit details
    Browse the repository at this point in the history
  2. Resolver perf: Implement TreeFS.hierarchicalLookup (2/n)

    Differential Revision: D58062988
    robhogan authored and facebook-github-bot committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    96eb9bf View commit details
    Browse the repository at this point in the history
  3. Resolver perf: Use hierarchicalLookup for closestPackage (3/n)

    Differential Revision: D58066514
    robhogan authored and facebook-github-bot committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    e6e7f55 View commit details
    Browse the repository at this point in the history