MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / reportProgress

Function reportProgress

src/hooks/asyncImageCachePrefetch.ts:42–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40 let lastReportedProgress = 0;
41
42 const reportProgress = () => {
43 const progress = getPrefetchProgress(completed, total);
44 if (shouldReportPrefetchProgress(completed, total, lastReportedProgress)) {
45 lastReportedProgress = progress;
46 onProgress?.(progress);
47 }
48 };
49
50 try {
51 const chunkSize = getPrefetchChunkSize(maxConcurrentLoads);

Callers 1

prefetchAsyncImagesFunction · 0.85

Calls 2

getPrefetchProgressFunction · 0.90

Tested by

no test coverage detected