-
-
Notifications
You must be signed in to change notification settings - Fork 201
Closed
Labels
Description
Adding a breadcrumb right now is using sentry__value_append_bounded to limit the number of breadcrumbs according to settings:
sentry-native/src/sentry_core.c
Lines 650 to 651 in a05b260
| sentry__value_append_bounded( | |
| scope->breadcrumbs, breadcrumb, max_breadcrumbs); |
However that internally does a costly memmove:
sentry-native/src/sentry_value.c
Line 658 in a05b260
| memmove(l->items, l->items + to_shift, to_move * sizeof(l->items[0])); |
It would be nice to find a way to optimize this, for example by using a ringbuffer / linked list, or some other method to avoid doing a O(n) memmove every time when adding breadcrumbs that are at their maximum.
Reactions are currently unavailable