Skip to content

Cache buffers, allow omitting span names, options for not formatting KVs all the time#45

Draft
nagisa wants to merge 3 commits intomainfrom
nagisa/perf-prototypes
Draft

Cache buffers, allow omitting span names, options for not formatting KVs all the time#45
nagisa wants to merge 3 commits intomainfrom
nagisa/perf-prototypes

Conversation

@nagisa
Copy link
Copy Markdown
Owner

@nagisa nagisa commented Jun 12, 2022

With this plain error!("banana") can take as little as 200ns (~0 overhead) but it will also lead to no meaningful messages if you have error!(someotherkey), and it will also drop all the KVs too.

Similarly, emitting a span can happen in “just” 1.2µs which is also pretty nice.

Finally, tracy_client::span!() “just works” and produces meaningful trace outputs, which is very nice. I think this one is likely uncontroversial and can be landed as is (see 2nd commit).

Otherwise this is just a code/brain dump to which I don't anticipate returning for a foreseeable future. If somebody/anybody wants to finish this up somehow, I encourage you to do so ^^.

nagisa added 3 commits June 12, 2022 19:14
This helps with the overhead of formatting the messages somewhat by not
going out to the global allocator, though the impact is less than I had
anticipated initially.
Tracy falls back to the function name in those instances, which for the
`span!()` macro at least produces pretty reasonable results.
@nagisa
Copy link
Copy Markdown
Owner Author

nagisa commented Oct 29, 2022

I went ahead and merged the 2nd commit, since improving on it is difficult, others though…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant