Yield native import scans by elapsed time and bounded work
This commit is contained in:
@@ -473,3 +473,12 @@ runs in the bubble phase so target handlers can claim it first; it cancels only
|
||||
this view's gesture. Style toolbars dismiss their own modes on unclaimed Escape,
|
||||
while input controls retain priority. The helper needs no browser globals at
|
||||
module load or when called with non-DOM ports.
|
||||
|
||||
|
||||
Native import scanners share `ImportScheduling` (`now`, `yieldTask`,
|
||||
`frameBudgetMs`, default 6 ms). Array/envelope scanners check elapsed time every
|
||||
128 scan steps; NDJSON checks after each bounded chunk. A 16 KiB/step work
|
||||
threshold also yields when the clock does not advance. Cancellation is checked
|
||||
again after each real task yield. Byte/ordinal cursors, parser versions and source
|
||||
fingerprints are unchanged. This is a soft budget: a bounded JSON decode is
|
||||
indivisible, and document-envelope range indexing still precedes record display.
|
||||
|
||||
Reference in New Issue
Block a user