Skip to content

Conversation

@HerringtonDarkholme
Copy link
Contributor

@HerringtonDarkholme HerringtonDarkholme commented Apr 10, 2025

Summary

Hi! ast-grep author here. Thanks for choosing ast-grep.

This PR optimizes the rule to be more selective so that we can avoid the O(node * tree_height)matching behavior.

Local minimal testing result

image

Related Links

see ast-grep/ast-grep#1920

close #914

Checklist

  • Tests not required.
  • Documentation updated not required.

@chenjiahan
Copy link
Member

Awesome 🚀

Copy link
Contributor

@Timeless0911 Timeless0911 left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

@Timeless0911 Timeless0911 merged commit 6f4e0f8 into web-infra-dev:main Apr 10, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: performance issue about redirect.js.path with @ast-grep/napi matcher

3 participants