Skip to content

Commit 7b1d31a

Browse files
authored
Add tracking for in-cache count (#915)
1 parent 8142a2d commit 7b1d31a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/base/TilesRendererBase.js

+3
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ export class TilesRendererBase {
140140
this.downloadQueue = downloadQueue;
141141
this.parseQueue = parseQueue;
142142
this.stats = {
143+
inCache: 0,
143144
parsing: 0,
144145
downloading: 0,
145146
failed: 0,
@@ -655,6 +656,7 @@ export class TilesRendererBase {
655656
}
656657

657658
// Decrement stats
659+
stats.inCache --;
658660
if ( t.__loadingState === LOADING ) {
659661

660662
stats.downloading --;
@@ -687,6 +689,7 @@ export class TilesRendererBase {
687689
const controller = new AbortController();
688690
const signal = controller.signal;
689691

692+
stats.inCache ++;
690693
stats.downloading ++;
691694
tile.__loadAbort = controller;
692695
tile.__loadingState = LOADING;

0 commit comments

Comments
 (0)