From 613d7f52f4f194e6805070328f66e7a3da5fe7c1 Mon Sep 17 00:00:00 2001 From: Garrett Johnson Date: Thu, 9 Jan 2025 19:41:37 +0900 Subject: [PATCH] Add tracking for in-cache count --- src/base/TilesRendererBase.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/base/TilesRendererBase.js b/src/base/TilesRendererBase.js index 97061555..d36227df 100644 --- a/src/base/TilesRendererBase.js +++ b/src/base/TilesRendererBase.js @@ -140,6 +140,7 @@ export class TilesRendererBase { this.downloadQueue = downloadQueue; this.parseQueue = parseQueue; this.stats = { + inCache: 0, parsing: 0, downloading: 0, failed: 0, @@ -655,6 +656,7 @@ export class TilesRendererBase { } // Decrement stats + stats.inCache --; if ( t.__loadingState === LOADING ) { stats.downloading --; @@ -687,6 +689,7 @@ export class TilesRendererBase { const controller = new AbortController(); const signal = controller.signal; + stats.inCache ++; stats.downloading ++; tile.__loadAbort = controller; tile.__loadingState = LOADING;