pub struct CompileSpans {
pub validate: Duration,
pub prepare: Duration,
pub classify: Duration,
pub admit: Duration,
pub walk: Duration,
pub glyphs: Duration,
pub finish: Duration,
}Expand description
What one SceneCompiler::compile call spent, phase by phase.
Zero across the board in a build without perf-trace — see [PhaseClock].
The phases partition the call in the order they run, so their sum is the
whole compile minus call overhead. Two edges are worth naming rather than
leaving to be inferred: the frame record and its depth counter are built
after the admit lap, so walk spans their construction as well as the
command walk itself; and the frust-perf img line a perf-trace build
emits is written after the last lap, so no phase is charged the cost of
reporting on one.
validate— the up-front finiteness and geometry sweep over every command. A frame is refused whole or not at all, so this sweep runs before the walk records anything and is paid on every frame in the command count.prepare— resetting the per-frame scratch (strip generator, clip/group/snapshot stacks, punches) and ageing the two caches that span frames (image residency,glifo’s prep cache).classify— routing every glyph run through [crate::text::atlas_policy] before any of them is drawn.admit— closing the glyph atlas’s own frame, which is where admission packs what the routing pass asked for.walk— building the frame record the walk fills, then the command walk itself: strip generation and paint encoding, and on a text-heavy scene the bulk of the call. The part of it spent inside glyph runs is reported separately byglyphs, which is a subset of this rather than a phase of its own.finish— closing open groups, generating the hole punches, ageing the glyph atlas and taking the frame’s image plan.
Observational only: nothing downstream branches on any of it.
Fields§
§validate: DurationThe up-front finiteness and geometry sweep over every command.
prepare: DurationPer-frame scratch resets and the two cross-frame caches’ ageing.
classify: DurationGlyph-run routing, ahead of the walk.
admit: DurationGlyph atlas admission, closing the routing pass.
walk: DurationThe command walk: strip generation and paint encoding.
glyphs: DurationThe part of walk spent inside glyph runs.
A subset of walk, not a seventh phase beside it, and so
deliberately excluded from Self::total: adding it would count the
glyph work twice. It exists because “the walk dominates” is not on its
own an actionable measurement on a text-heavy scene — whether the cost
is the text or everything drawn around it is the question that decides
where a lever could go.
Accumulated per Command::GlyphRun rather than per glyph: a run is
the unit the cache and the atlas policy both work in, and two clock
reads a glyph would cost more than the phase being measured.
finish: DurationClosing groups, punch generation, atlas ageing, the image plan.
Implementations§
Trait Implementations§
Source§impl Clone for CompileSpans
impl Clone for CompileSpans
impl Copy for CompileSpans
Source§impl Debug for CompileSpans
impl Debug for CompileSpans
Source§impl Default for CompileSpans
impl Default for CompileSpans
impl Eq for CompileSpans
Source§impl PartialEq for CompileSpans
impl PartialEq for CompileSpans
impl StructuralPartialEq for CompileSpans
Auto Trait Implementations§
impl Freeze for CompileSpans
impl RefUnwindSafe for CompileSpans
impl Send for CompileSpans
impl Sync for CompileSpans
impl Unpin for CompileSpans
impl UnsafeUnpin for CompileSpans
impl UnwindSafe for CompileSpans
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.