MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / dequeueNextRenderTask

Function dequeueNextRenderTask

renderer.js:839–852  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

837}
838window._runScanSTLHomeImpl = runScanSTLHomeImpl;
839
840// Add these queue-related variables
841let renderQueue = [];
842/** Lower values run first. Scan / off-grid work uses THUMB_PRIORITY_BACKGROUND so on-screen grid cells win. */
843const THUMB_PRIORITY_BACKGROUND = 1e12;
844/** Priorities at or above this are off-viewport grid rows (see computeThumbPriorityForScroll / refresh). */
845const THUMB_PRIORITY_LOW_TIER_MIN = 2e9;
846/** Extra delay after each low-priority render so visible/interactive work stays smooth. */
847let RENDER_DELAY_BACKGROUND = 750;
848/** When the queue has only off-screen work, cap parallel WebGL thumbs (foreground uses MAX_CONCURRENT_RENDERS). */
849let MAX_CONCURRENT_RENDERS_BACKGROUND = 2;
850let pendingThumbnails = new Set(); // Track files currently being rendered
851
852function isLowPriorityThumbnailTask(task) {
853 const p = task?.thumbPriority ?? THUMB_PRIORITY_BACKGROUND;
854 return p >= THUMB_PRIORITY_LOW_TIER_MIN;
855}

Callers 1

processRenderQueueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected