Skip to content

Commit

Permalink
Add tracking for in-cache count
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Jan 9, 2025
1 parent 8142a2d commit 613d7f5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/base/TilesRendererBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export class TilesRendererBase {
this.downloadQueue = downloadQueue;
this.parseQueue = parseQueue;
this.stats = {
inCache: 0,
parsing: 0,
downloading: 0,
failed: 0,
Expand Down Expand Up @@ -655,6 +656,7 @@ export class TilesRendererBase {
}

// Decrement stats
stats.inCache --;
if ( t.__loadingState === LOADING ) {

stats.downloading --;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 613d7f5

Please sign in to comment.