mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +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))
|
if (egg_bitset_iter_init_first (&iter, bitset, &position))
|
||||||
{
|
{
|
||||||
|
guint count = 0;
|
||||||
guint first = position;
|
guint first = position;
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
@ -104,6 +105,8 @@ sysprof_normalized_series_update_missing (gint64 deadline,
|
|||||||
|
|
||||||
g_assert (self->values->len > position);
|
g_assert (self->values->len > position);
|
||||||
|
|
||||||
|
count++;
|
||||||
|
|
||||||
if (!self->inverted)
|
if (!self->inverted)
|
||||||
*fval = _sysprof_axis_normalize (self->axis, &value);
|
*fval = _sysprof_axis_normalize (self->axis, &value);
|
||||||
else
|
else
|
||||||
@ -114,7 +117,8 @@ sysprof_normalized_series_update_missing (gint64 deadline,
|
|||||||
if (self->disposed)
|
if (self->disposed)
|
||||||
break;
|
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) ||
|
if (!egg_bitset_iter_init_first (&iter, bitset, &next) ||
|
||||||
next != position + 1 ||
|
next != position + 1 ||
|
||||||
|
|||||||
Reference in New Issue
Block a user