pact-foundation / pact-reference

Reference implementations for the pact specifications
https://pact.io
MIT License
91 stars 46 forks source link

refactor: bump indextree, use append_value() #260

Closed YoniFeng closed 1 year ago

YoniFeng commented 1 year ago

I added a fast path for adding new nodes with indextree - https://github.com/saschagrunert/indextree/pull/92. From a glimpse at this project I'm guessing perf isn't important, but maybe you'll still be interested in this tiny refactor.

rholshausen commented 1 year ago

Thanks for the PR.

Performance has never been raised as an issue, I guess because it mainly deals with small file sizes. Do you happen to know what the benefit of this change would be? I assume you looked at some performance metrics to get to the point to make this change?

YoniFeng commented 1 year ago

I don't know what the benefit would be for pact_models. You can see the impact for JS parser building an AST here.

I got here after making the change in indextree and thought "I should look at dependents that can benefit from a quick change". indextree doesn't have huge dependents, and this project was at the top :)

rholshausen commented 1 year ago

Nice! And thanks again for the PR.