From 7b1d31ad3dd7d8d25de5b0d27b343500db2dfb8b Mon Sep 17 00:00:00 2001 From: Garrett Johnson Date: Thu, 9 Jan 2025 19:56:39 +0900 Subject: [PATCH] Add tracking for in-cache count (#915) --- 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;