diagnostics: expose snapshot cache invalidation causes
Verify Tessera GUI / verify (push) Has been cancelled
Verify Tessera GUI / verify (push) Has been cancelled
This commit is contained in:
+1
-1
@@ -206,7 +206,7 @@ Source paint now uses a resumable read-only VM call with the same 256-instructio
|
||||
Layout and paint drivers now prepare one occurrence at a time. Their fixed-size outer bytecode repeats on the same VM frame; a short-lived helper retains only the current call, its bounds/arguments and collector. The helper is released before the next occurrence. Layout keeps bottom-up measure, top-down arrange and the same settling loop. Paint advances even intrinsic method classification through VM quanta. The weak occurrence list and native scratch/output data remain proportional to the actual tree, but preparation no longer allocates managed callables/Bounds for the whole tree before the first slice. All helpers share the original read-only scope and cumulative instruction/frame limits. Weak-list copying, structural extraction, settling and final projection remain bounded atomic native work.
|
||||
|
||||
|
||||
Presentation dependency diagnostics record a counter and the last invalidated object kind/identity and version transition. ui.stats exposes dependencyInvalidations and lastInvalidDependency without retaining the dependency or rendering its data. These help distinguish expected input invalidation from repeated background refresh.
|
||||
Presentation dependency diagnostics record a counter and the last invalidated object kind/identity and version transition. ui.stats exposes dependencyInvalidations and lastInvalidDependency without retaining the dependency or rendering its data. Snapshot replacement also records its last invalidating object/property or change-journal overflow, so cache invalidation can be distinguished from source layout/paint dependencies. These help distinguish expected input invalidation from repeated background refresh.
|
||||
|
||||
|
||||
ui.readText(owner,key,path[,callback]) returns an owner-scoped Task and reads a regular UTF-8 file off the VM thread. Paths use native filesystem syntax; absolute paths are recommended. The optional callback takes zero arguments and must return Unit; it runs only on successful read and can use task.result(). Without a callback, poll status then read result from code. result() is available while a success callback is running or after completion (timers return Unit); error() returns an empty String or the provider/callback error. A provider failure marks the task failed and skips its callback without stopping the VM; a source callback failure still stops the shared domain. Owner/key replacement, explicit cancellation, close/reset/VM discard and GC drop the provider lease, remove queued completion and reject late delivery. In-progress OS reads may finish, but cannot deliver after cancellation. Only the owning VM worker updates managed results and rechecks owner/key identity. No VM handles enter provider threads beyond opaque weak identities.
|
||||
|
||||
@@ -28,6 +28,7 @@ pub struct RenderCache {
|
||||
dependents: HashMap<Dependency, HashSet<ObjectRef>>,
|
||||
parents: HashMap<ObjectRef, HashSet<ObjectRef>>,
|
||||
dirty: HashSet<ObjectRef>,
|
||||
pub last_invalidation: String,
|
||||
pub visited: usize,
|
||||
pub reused: usize,
|
||||
}
|
||||
@@ -36,6 +37,7 @@ impl RenderCache {
|
||||
pub fn invalidate(&mut self, batch: ChangeBatch) {
|
||||
let mut queue = VecDeque::new();
|
||||
if batch.rescan_required {
|
||||
self.last_invalidation = "change journal overflow".into();
|
||||
queue.extend(self.entries.keys().copied());
|
||||
} else {
|
||||
for change in batch.changes {
|
||||
@@ -47,6 +49,7 @@ impl RenderCache {
|
||||
},
|
||||
};
|
||||
if let Some(owners) = self.dependents.get(&key) {
|
||||
self.last_invalidation = format!("{} {:?}", key.object, key.property);
|
||||
queue.extend(owners);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2492,6 +2492,10 @@ impl UiBridge {
|
||||
|| state.force_frame
|
||||
|| tabs != state.last_tabs;
|
||||
if changed {
|
||||
if !same {
|
||||
state.last_invalid_dependency =
|
||||
format!("snapshot {}", state.render_cache.last_invalidation);
|
||||
}
|
||||
state.snapshot_visited = state.render_cache.visited;
|
||||
state.snapshot_reused = state.render_cache.reused;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user