Here's a stat that should terrify you: 53% of mobile users abandon sites that take longer than 3 seconds to load.
Not 30 seconds. Three.
You have less time to capture a user's attention than a goldfish has to forget where it is.
When I built this portfolio, I became obsessed with that number. Not "professional interest" obsessed. "Checking Lighthouse at 3 AM" obsessed.
The Starting Point (The Shame)
My first lighthouse audit was... humbling. It was the digital equivalent of getting a slow clap from a disappointed teacher.
- Performance: 67 (Ouch)
- Accessibility: 89
- Best Practices: 92
- SEO: 85
- That's a D+. That's "see me after class."
I wanted 100s. I needed the green circles.
The Performance Killers
After days of profiling, I identified the culprits:
1. Unoptimized Images
My hero image was a 12.4 MB PNG. In 2025.
I was basically asking users to download a small novel every time they loaded the homepage.
// Before: Pain
<img src="/hero.png" />
// After: Speed
<Image
src={cloudinaryUrl}
alt="Description"
width={800}
height={600}
priority
/>
Moving to Cloudinary with f_auto reduced that 12.4 MB to 180 KB. Same visual quality. 92% smaller file. I felt like a wizard.
2. JavaScript Bundle Size
I was importing the entire lucide-react icon library when I only needed 12 icons.
// Before: Importing the known universe (400KB)
import * as Icons from 'lucide-react';
// After: Importing what I use (12KB)
import { Github, Mail, ExternalLink } from 'lucide-react';
Tree-shaking works. But you have to actually shake the tree.
(Narrator: He had not, in fact, shaken the tree. He had brought the entire forest.)
3. Layout Shift (CLS)
My tech stack carousel was causing massive layout shifts on mobile. Elements jumping around like caffeinated rabbits.
The fix? Reserve space with aspect ratios and skeleton loaders:
.carousel-container {
aspect-ratio: 16 / 9;
min-height: 200px;
}
CLS dropped from 0.25 to 0.001.
Did You Know?
Trivia: Google uses Core Web Vitals as a ranking factor. A site with good vitals can outrank a site with better content but poor performance. Speed literally buys SEO.
The Cloudinary Revelation
I used to self-host images. Then I learned about Cloudinary transformations.
This single URL does things that would take me 4 hours in Photoshop:
https://res.cloudinary.com/demo/image/upload/f_auto,q_auto,w_800/sample.jpg
f_auto: Serves WebP to Chrome, AVIF to Safari, JPEG to Internet Explorer (if anyone is still suffering there)q_auto: Compresses without looking like a potatow_800: Resizes server-side
My image delivery costs? $0. Their free tier is generous enough for my ego.
The Dynamic Import Strategy
Not everything needs to load immediately.
// Components below the fold? Lazy load them.
const TestimonialsSection = dynamic(() => import('./testimonials-section'), { loading: () => <Skeleton /> });
This shaved 200ms off my First Contentful Paint. The user sees the hero section instantly. Everything else loads as they scroll.
The Final Scores
After two weeks of optimization:
- Performance: 100 ✅
- Accessibility: 100 ✅
- Best Practices: 100 ✅
- SEO: 100 ✅
Four perfect scores. On mobile. I screenshotted it. I framed it. (I didn't frame it, but I thought about it.)
And down again to 90/100 as I am developing this blog section 💀.
The Checklist
If your site is slow, check these first:
- Images: Are they WebP/AVIF? (If they're PNGs, shame on you.)
- Fonts: Using
font-display: swap? - JavaScript: Any unnecessarily large imports?
- Third-party scripts: Do you really need 4 different analytics tools? (No.)
The Bottom Line
Performance isn't just vanity metrics.
It's respect.
A fast site says: "I value your time." A slow site says: "I hope you enjoy staring at a white screen while I load 4 MB of uncompressed hero images."
Choose wisely. ⚡