Leonardo Borges Ramos

Performance of this siteMeasured live on Oct 20, 2026

Measure before you touch it.

Three performance problems in this portfolio itself, each with a cause found by measuring, and two ideas that looked good until measurement rejected them.

Problem

This site's 3D intro dragged: scrolling at 21 fps, a 1.25 s frame on the transition and the page jumping (CLS 0.60).

What I did

I measured each one with traces and Long Animation Frames, found the cause by measurement and left a test that fails if the defect returns.

Result

Scrolling near 60 fps, a 183 ms worst frame and CLS 0 on laptop, large monitor and phone.

21 → 60fps while scrolling
Source ¹

Aug 30, 2026, Chrome with GPU, the page's own meter; live, 17.4 ms (~57 fps).

1,251 → 183ms worst frame
Source ²

Sep 14 and Sep 20, 2026, 1920×1080, first visit, real Chrome without throttling; four cold visits in a row live: 183 · 200 · 284 · 283 ms.

0.60 → 0CLS: the page stopped jumping
Source ³

Oct 9, 2026 (before); Oct 20, 2026 live, script testes/_dez-segundos.mjs at 1366, 1920 and 390.

Three decisions

Decided

1. Replace five background layers with screen-sized boxes

BecauseThe trace showed 0.5 s of JavaScript against ~9 s of compositing: a long frame without a long JS task is compositing.

CostProving pixel by pixel that the drawing did not change: mean difference of 0.37 out of 255.

Decided

2. Save once the computation that was constant

BecauseThe environment map cost ~700 ms and gave the same result on every machine.

CostOne more 166 KB file, preloaded and opened in a worker (681 ms → 1 ms).

Decided

3. Move the canvas with transform, not layout

BecauseEvery layout repositioning counted as the page jumping.

CostEvery position calculation moved to transform, anchored to the corner.

Role
Everything: it is my site
When
August to October 2026
Tools
Chrome DevTools Protocol · traces · Long Animation Frames · tests that fail on regression
Result
21 → 60 fps¹ · worst frame 1,251 → 183 ms² · CLS 0.60 → 0³

1. Scrolling at 21 fps was not the 3D

The turn from the opening to the second room dragged: 48.5 ms per frame. A study pointed at five causes; measurement refuted four (re-renders, layout, garbage collection, pixel density). The trace settled it: 0.5 s of JavaScript against ~9 s of raster and compositing in the same 13.8 s window. A long frame with no long JS task is compositing.

The cause: five background layers, each 1.85 screens in area with transparency, added up to ~9 screens of blending per frame, the ceiling of an integrated GPU. They became screen-sized boxes with the same geometry rewritten. To prove the picture did not change, I compared the background pixel by pixel at seven scroll positions: mean difference 0.37 out of 255.

before48.5 ms
after16.8 ms

A test now fails above 30 ms per frame, and it was seen failing with the defect put back.

2. The pass to the second room: from 1,251 ms to 183 ms

Worst frame on a first visit, at 1920×1080, with the visitor scrolling from the first second. Three causes:

rejected idea2,401 ms
Sep 14, before1,251 ms
Sep 20, before717 ms
Sep 20, live183 ms

3. The page that jumped: CLS 0.60 → 0

The 3D canvas was repositioned through layout properties on every adjustment, and the browser counted each one as the page jumping: CLS of 0.60 at 1366, 0.14 at 1920 and 0.10 on tablet. Now it moves with transform, anchored to the corner. Measured live today: 0.000 on laptop, large monitor and phone.

before0.60
after0.000

What went wrong: two ideas the measurement rejected

  1. Idea 1create the 3D programs earlier: 961 / 817 / 1,039 ms against 864 / 936 / 865 ms, no change
  2. Idea 2only work while the page is still: someone who keeps scrolling never gives the break, and the worst frame hit 2,401 ms

What stayed: The method: every idea goes through measurement before it stays.

The method

¹ Aug 30, 2026, Chrome with GPU, the page's own meter; live, 17.4 ms (~57 fps).

² Sep 14 and Sep 20, 2026, 1920×1080, first visit, real Chrome without throttling; four cold visits in a row live: 183 · 200 · 284 · 283 ms.

³ Oct 9, 2026 (before); Oct 20, 2026 live, script testes/_dez-segundos.mjs at 1366, 1920 and 390.

Quer conversar sobre este projeto?