aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/app.js b/src/app.js
index ab21cf9..77df9c1 100644
--- a/src/app.js
+++ b/src/app.js
@@ -3191,11 +3191,21 @@ function dlog(s) {
}
// TEMP: continuously watch for dropped frames and log any >40ms gap, so a
// real drag's jank shows up in __dl next to the release/settle it overlaps.
+// Also trace scrollLeft every frame into __scroll to catch a position JUMP
+// (a stutter that isn't a dropped frame).
try {
let _lastFrame = performance.now();
+ window.__scroll = [];
const _fw = (t) => {
const gap = t - _lastFrame; _lastFrame = t;
if (gap > 40) dlog('FRAME-DROP ' + Math.round(gap) + 'ms');
+ try {
+ const el = document.querySelector('.bal-carousel');
+ if (el) {
+ window.__scroll.push([Math.round(t), Math.round(el.scrollLeft), Math.round(gap)]);
+ if (window.__scroll.length > 400) window.__scroll.shift();
+ }
+ } catch {}
requestAnimationFrame(_fw);
};
requestAnimationFrame(_fw);