You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently decided to pre-allocate up to 8 attributes, to avoid reallocation/copy costs, but attributes are still always on the heap.
Opening an issue to track improving this, so that, up to 8 attributes can be stack allocated, and then fallback to heap for more attributes. This, along with #1919, allow one to write logs without any allocation when using synchronous exporters like etw/user_events that require no batching.
We could add a dependency on SmallVec or make a home-grown solution. For an example implementation, .NET's TagList can be referred, which optimizes for up to 8 attributes.
We may need a feature flag to control this, as some scenarios (eg: Kernel mode) has less stack available.
The text was updated successfully, but these errors were encountered:
fixed in #1965 . The feature flag as discussed in #2055 would be added as required. Will create a separate issue for supporting kernel mode applications.
We recently decided to pre-allocate up to 8 attributes, to avoid reallocation/copy costs, but attributes are still always on the heap.
Opening an issue to track improving this, so that, up to 8 attributes can be stack allocated, and then fallback to heap for more attributes. This, along with #1919, allow one to write logs without any allocation when using synchronous exporters like etw/user_events that require no batching.
We could add a dependency on SmallVec or make a home-grown solution. For an example implementation, .NET's
TagList
can be referred, which optimizes for up to 8 attributes.We may need a feature flag to control this, as some scenarios (eg: Kernel mode) has less stack available.
The text was updated successfully, but these errors were encountered: