Shopify / packwerk

Good things come in small packages.
MIT License
1.54k stars 111 forks source link

[Request For Comments] Use Prism as the default parser? #386

Closed exterm closed 5 months ago

exterm commented 5 months ago

Friends,

last time I profiled Packwerk a few years ago, about 2/3 of the execution time was spent parsing. A coworker just recently profiled it again and basically this still seems to be the case.

I tried to write a new parser based on ripper in 2021, when I was still at Shopify. However, that turned out to be a lot of work. Back then, I was hoping for @kddnewton 's work on a new parser to bear fruit, so that we can use it for packwerk at some point.

Well, prism is now a thing. Would it make sense to swap out the currently used whitequark parser for prism?

@kddnewton how much faster do you expect Prism to be compared with the whitequark parser? I couldn't find any benchmarks.

If this makes sense, I might take a stab at it - provided I can get someone to pay me for the time spent on it

exterm commented 5 months ago

This should probably be a discussion instead

exterm commented 5 months ago

Discussion created: https://github.com/Shopify/packwerk/discussions/387