mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
sysprof: reduce expiry check to once every 10 iterations
This commit is contained in:
@ -90,6 +90,7 @@ sysprof_normalized_series_update_missing (gint64 deadline,
|
||||
|
||||
if (egg_bitset_iter_init_first (&iter, bitset, &position))
|
||||
{
|
||||
guint count = 0;
|
||||
guint first = position;
|
||||
|
||||
for (;;)
|
||||
@ -104,6 +105,8 @@ sysprof_normalized_series_update_missing (gint64 deadline,
|
||||
|
||||
g_assert (self->values->len > position);
|
||||
|
||||
count++;
|
||||
|
||||
if (!self->inverted)
|
||||
*fval = _sysprof_axis_normalize (self->axis, &value);
|
||||
else
|
||||
@ -114,7 +117,8 @@ sysprof_normalized_series_update_missing (gint64 deadline,
|
||||
if (self->disposed)
|
||||
break;
|
||||
|
||||
expired = g_get_monotonic_time () >= deadline;
|
||||
/* Only do expiry check every 10 items */
|
||||
expired = count % 10 == 0 && g_get_monotonic_time () >= deadline;
|
||||
|
||||
if (!egg_bitset_iter_init_first (&iter, bitset, &next) ||
|
||||
next != position + 1 ||
|
||||
|
||||
Reference in New Issue
Block a user