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

perf(resolve): skip absolute paths in root as url checks #12476

Merged
merged 2 commits into from
Mar 21, 2023

Conversation

patak-dev
Copy link
Member

Description

Implements @bluwy's idea of a pre-cached root/root check when resolving absolute paths, allowing skipping the check as a URL for common absolute paths. See #12471 (comment)

After this PR, #12471 still counts as an optimization if we merge #12450

We could add a watcher to check if root/root is created after the server starts but I feel it is a very uncommon edge case and we could keep it simple. Open to adding more complexity if we think that is important here.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@stackblitz
Copy link

stackblitz bot commented Mar 18, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

bluwy
bluwy previously approved these changes Mar 19, 2023
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Agree that we can go with a simple implementation for now for the common case.

@bluwy bluwy added p4-important Violate documented behavior or significantly improves performance (priority) performance Performance related enhancement labels Mar 19, 2023
@patak-dev patak-dev merged commit 8d2931b into main Mar 21, 2023
@patak-dev patak-dev deleted the perf/skip-absolute-paths-in-roots-as-url-checks branch March 21, 2023 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4-important Violate documented behavior or significantly improves performance (priority) performance Performance related enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants