lttng / lttng-scope

A trace viewer and analyzer for LTTng kernel and user space traces
https://lttng.org/beta/#lttng-scope
Eclipse Public License 1.0
28 stars 6 forks source link

Avoid doing full state system queries for every timegraph model interval #30

Closed ghost closed 7 years ago

ghost commented 7 years ago

Currently the "interval context" fetches a full query at the interval's start time. This is used to populate other side-information, like the state's label or the tooltip contents.

This is bad! Ideally this information should be fetched on-demand (once the tooltip is show, once the view determines there is enough room to paint a state name, etc.) Another possibility would be to do single queries to fetch the required information. It would require the state model implementation to define which quarks should be part of the interval context.

But full queries should be avoided at all costs. With the introduction of aggregation rules (where querying one quark can mean fetching 10+ other quarks for each rule) full query performance has slowed down greatly, so they should only be done when really needed.