Transcript Incremental Projection
Nucleic-Session: 0FFD007B-0696-4517-9429-129C7B0FD5AC Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -538,8 +538,12 @@ struct TranscriptList: View {
|
|||||||
}
|
}
|
||||||
prewarmProgress.count = current.count
|
prewarmProgress.count = current.count
|
||||||
guard !bodies.isEmpty else { return }
|
guard !bodies.isEmpty else { return }
|
||||||
prewarmTask?.cancel()
|
// Chain batches instead of cancelling the in-flight one: each batch covers *new* rows
|
||||||
prewarmTask = Task.detached(priority: .utility) {
|
// only, so cancelling a predecessor (say, the big open batch, superseded by the first
|
||||||
|
// streamed row) would permanently drop its coverage. `onDisappear` cancels the head of
|
||||||
|
// the chain; a predecessor mid-parse just finishes its bounded batch into shared caches.
|
||||||
|
prewarmTask = Task.detached(priority: .utility) { [previous = prewarmTask] in
|
||||||
|
await previous?.value
|
||||||
for body in bodies {
|
for body in bodies {
|
||||||
if Task.isCancelled { return }
|
if Task.isCancelled { return }
|
||||||
MarkdownText.prewarm(body)
|
MarkdownText.prewarm(body)
|
||||||
|
|||||||
Reference in New Issue
Block a user