SWING homepage performance
Period 2026.07
- Role
- I improved the SWING homepage frontend across rendering, media, fonts, and image loading.
- Result
- In local Lighthouse mobile simulations, medians from 3 runs before and 5 after showed Performance rising from 54 to 95 and initial transfer falling from 19.805 to 0.488 MB (a 97.5% reduction).
Context
The first screen appeared slowly and initial transfer was large. I examined how rendering, media, fonts, and external content affected loading.
Key decisions
Render and load the first screen
I moved from Pages Router to a server-first App Router structure and prerendered Korean and English routes. I replaced the hero GIF with an MP4 and WebP poster and loaded external content near the viewport.
Preserve font weights while reducing requests
A regular-only font could lose the original design’s weight distinctions. After a separate comparison, I chose a variable WOFF2 subset that kept them while reducing requests.
Move image conversion to the build
After the initial improvements, I observed a first-image-conversion delay in production. I changed on-request conversion to build-time generation of 106 responsive WebP assets from 34 originals.
Implementation details
View implementation flow
I examined rendering, browser resources, and per-request server work separately. I prepared what the first screen needed early, leaving interaction and external content where they were needed.
Build
Generate pages by language and image variants
Read every stage
- 01Build
Generate pages by language and image variants
- 02First response
Serve prepared HTML and video poster
- 03Interaction
Load client code for menu and carousel
- 04Scroll
Load external content near the viewport
Client component boundary
I generated language routes with generateStaticParams and read translation dictionaries on the server. Pages and layouts used Server Components; parts requiring state and events, such as the menu, became separate Client Components.
Iframe loading near the viewport
IntersectionObserver created the iframe when the news section came within 300px of the viewport, then stopped observing. Space of the same height was reserved before loading. A fallback load path kept the content available when the browser did not support the observation API.
Build-time image conversion
At build time, sharp corrected rotation, resized images to target widths, and generated WebP files. The custom next/image loader chose a variant at least as wide as requested and returned a static file URL. Unregistered images used their original path, and generated files were separated by versioned paths.
Font weights and request priority
One variable WOFF2 subset covered the weights in use and was connected through next/font/local. To account for the hero poster’s initial priority, I disabled font preload and used display: swap. I checked the effect of this choice in a separate font comparison.
Verification
- Image follow-up
- Local production checks after the image change recorded 0 image conversion requests and 0 broken images across 10 Korean and English routes.
Results with their measurement conditions
Choose an experiment, then compare its metrics before and after.
July 2026 local production build · Lighthouse mobile simulation · medians of 3 runs before / 5 after
The homepage comparison measured the combined effect of changes to rendering, media, fonts, and external content loading.
View all measured values in a table
| Experiment | Metric | Before | After |
|---|---|---|---|
| Homepage | Performance score | 54 points | 95 points |
| Initial transfer | 19.805 MB | 0.488 MB | |
| Font choice | Font requests | 4 requests | 1 requests |
| Font transfer | 186.9 KB | 109.6 KB |
- Homepage
- July 2026 local production build · Lighthouse mobile simulation · medians of 3 runs before / 5 after
- Font choice
- Separate font comparison measured 5 times under the same local conditions · distinct from the full-homepage comparison