Skip to content

perf(resolver): stat absolute paths once in fast path#229

Merged
pi0 merged 3 commits intomainfrom
perf/fs-stat
Feb 21, 2024
Merged

perf(resolver): stat absolute paths once in fast path#229
pi0 merged 3 commits intomainfrom
perf/fs-stat

Conversation

@pi0
Copy link
Copy Markdown
Member

@pi0 pi0 commented Feb 21, 2024

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

When the internal _resolve method detects an absolute URL, it calls fs stat twice once for checking the existence and once for following links. This can be combined into one.

Also since resolution already follows symlinks, it is unnecessary to call it again.

(added tests)

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pi0 pi0 merged commit 99606ea into main Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant