newrelic / node-newrelic

New Relic Node.js agent code base. Developers are welcome to create pull requests here, please see our contributing guidelines. For New Relic technical support, please go to http://support.newrelic.com.
Apache License 2.0
971 stars 399 forks source link

Cache segment tree instead of generating on every request #2696

Open bizob2828 opened 1 week ago

bizob2828 commented 1 week ago

Description

We get the tree of segments when we serialize a transaction trace from root but we also get a tree from a segment to calculate the exclusive time. We should either cache or build the tree on the trace so when you want to get the tree from a segment id it's already built.

workato-integration[bot] commented 1 week ago

https://new-relic.atlassian.net/browse/NR-335774