honeycombio / beeline-go

Legacy instrumentation for golang apps with Honeycomb
https://honeycomb.io
Apache License 2.0
74 stars 48 forks source link

perf: "app." + key is allocating new objects still #401

Closed lizthegrey closed 10 months ago

lizthegrey commented 11 months ago

Versions

Steps to reproduce

  1. Run shepherd at high volume ;)
  2. Look at the profiles.
  3. Weep.

Screenshot from 2023-11-22 10-04-31

Additional context

328 tried to make this better (before, we were using sprintf which is worse ugh), but it's now 7% of our allocations. This is not good. We probably would save time using a LRU cache for mapping foo to app.foo to avoid allocating brand new strings every time.

robbkidd commented 11 months ago

Another contender for a memory improvement when adding fields: #406 or "allow the user to optimize".