From d89bc9409bb880e162d25b00d3ea8b0e01037072 Mon Sep 17 00:00:00 2001 From: ryanhamley Date: Mon, 4 May 2020 11:22:05 -0700 Subject: [PATCH 1/2] Fix instrumentation for memory metrics --- src/ui/map.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ui/map.js b/src/ui/map.js index 613bd549f47..d1f652c253b 100755 --- a/src/ui/map.js +++ b/src/ui/map.js @@ -2522,13 +2522,14 @@ class Map extends Camera { if (somethingDirty || this._repaint) { this.triggerRepaint(); } else if (!this.isMoving() && this.loaded()) { - if (!this._fullyLoaded) { - this._fullyLoaded = true; - PerformanceUtils.mark(PerformanceMarkers.fullLoad); - } this.fire(new Event('idle')); } + if (!this._fullyLoaded) { + this._fullyLoaded = true; + PerformanceUtils.mark(PerformanceMarkers.fullLoad); + } + return this; } From 984b230bae4e8ed64888a5c0fec20929888e1210 Mon Sep 17 00:00:00 2001 From: ryanhamley Date: Mon, 4 May 2020 11:38:23 -0700 Subject: [PATCH 2/2] Fix if statement --- src/ui/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/map.js b/src/ui/map.js index d1f652c253b..29cd55d40c1 100755 --- a/src/ui/map.js +++ b/src/ui/map.js @@ -2525,7 +2525,7 @@ class Map extends Camera { this.fire(new Event('idle')); } - if (!this._fullyLoaded) { + if (this._loaded && !this._fullyLoaded && !somethingDirty) { this._fullyLoaded = true; PerformanceUtils.mark(PerformanceMarkers.fullLoad); }