fixes history loading slowly due to context switches

This commit is contained in:
2025-01-04 19:13:32 -05:00
parent c69022448f
commit 4dd7cea97d
12 changed files with 278 additions and 122 deletions

View File

@@ -198,6 +198,8 @@ const show_data_at_time = computed(() => {
}
});
const should_fade = ref(false);
provide<GraphData>(GRAPH_DATA, {
border_top: border_top,
min_x: min_x,
@@ -216,6 +218,7 @@ provide<GraphData>(GRAPH_DATA, {
legend_y_stride: legend_y_stride,
legend_width: legend_width_output,
cursor_time: show_data_at_time,
should_fade: (value) => (should_fade.value = value),
});
</script>
@@ -286,7 +289,9 @@ provide<GraphData>(GRAPH_DATA, {
></TimeText>
</template>
</g>
<slot></slot>
<g :class="`${should_fade ? 'fade' : ''}`">
<slot></slot>
</g>
<g class="cursor_tick" v-if="mouse_t && cursor">
<rect
:x="x_map(mouse_t) - 100"