1. X
  2. Michael Hart
Log inSign up
Michael Hart
15.8K posts
Image
user avatar
Michael Hart
@hichaelmart
Principal Engineer @Cloudflare. Previously: VP @Bustle, CTO @Adslot, AWS Hero.
medium.com/@hichaelmart
Joined March 2008
1,146
Following
3,986
Followers
RepliesRepliesMediaMedia

New to X?

Sign up now to get your own personalized timeline!

Create account

By signing up, you agree to the Terms of Service and Privacy Policy, including Cookie Use.

TermsยทPrivacyยทCookiesยทAccessibilityยทAds Infoยทยฉ 2026 X Corp.
Don't miss what's happening
People on X are the first to know.
Log inSign up
  • user avatar
    Michael Hart
    @hichaelmart
    Oct 6, 2025
    PSA for zod v4 users, esp on Lambda, Vercel, CF Workers, etc with a bundler: import * as z from โ€œzodโ€; // โœ… 68kb import { z } from โ€œzodโ€; // โŒ 244kb
    130K
  • user avatar
    Michael Hart
    @hichaelmart
    Sep 1, 2020
    If you're ever feeling down about your code, keep your chin up: I just noticed the AWS SDK has had this for six years ๐Ÿ˜ฌ (you can't compare arrays like this in JS)
    Image
  • user avatar
    Michael Hart
    @hichaelmart
    Oct 27, 2025
    Made Next.js fast. Er. โ€ข Bun: 1.15x faster โ€ข Node.js: 1.18x faster โ€ข CF Workers: 1.24x faster โ€ข Deno: 1.38x faster ๐Ÿš€
    user avatar
    Michael Hart
    @hichaelmart
    Oct 27, 2025
    Replying to @hichaelmart
    I've made a PR to optimize some of that work. It currently creates 1745 ReadableStreams per request unnecessarily ๐Ÿ˜ฌ This fix eliminates that and you get a 10-38% perf boost (Deno users get the most!) github.com/vercel/next.jsโ€ฆ
    80K
  • user avatar
    Michael Hart
    @hichaelmart
    Oct 27, 2025
    What makes Next.js slow? In cases like @theo's benchmark, it's because it's creating multiple React streams, parsing and rendering to JSON and HTML, reading the whole body along the way and doubling the payload. Next.js = 220ms, plain React streams the same thing in 27ms
    Image
    Image
    75K
  • user avatar
    Michael Hart
    @hichaelmart
    Sep 26, 2019
    One of the biggest engineering costs you can reduce is developer-thumb-twiddling. Brought our frontend CI time down from 8 mins to 25 secs by parallelizing on AWS Lambda (@lamb_ci). Each Lambda tests every nth file (testing/formatting/linting 3k files over 13 sites).
    Image
    00:00
  • user avatar
    Michael Hart
    @hichaelmart
    Dec 9, 2019
    Want to make your Lambda's 1,390x cheaper?
    Image
    Shave 99.93% off your Lambda bill with this one weird trick
    From hichaelmart.medium.com
  • user avatar
    Michael Hart
    @hichaelmart
    Nov 14, 2025
    A bunch of ppl have asked me to explain this Next.js performance issue. Settle in for a tale of laziness, batching and doing too much work. โ˜•๏ธ๐Ÿงต
    user avatar
    Michael Hart
    @hichaelmart
    Oct 29, 2025
    So I just discovered a 68% performance boost to Next.js and it all comes back to this (I dunno if they'll go for it though ๐Ÿ˜ฌ)
    103K
  • user avatar
    Michael Hart
    @hichaelmart
    Oct 29, 2025
    So I just discovered a 68% performance boost to Next.js and it all comes back to this (I dunno if they'll go for it though ๐Ÿ˜ฌ)
    This post is unavailable.
    193K
  • user avatar
    Michael Hart
    @hichaelmart
    Aug 11, 2017
    Oh nice one โ€“ย AWS just released their local build/testing tool for Lambda, based on docker-lambda:
    Image
    New โ€“ AWS SAM Local (Beta) โ€“ Build and Test Serverless Applications Locally | Amazon Web Services
    From aws.amazon.com
  • user avatar
    Michael Hart
    @hichaelmart
    Oct 31, 2025
    Wait wait, I meant a 91% boost
    Image
    user avatar
    Michael Hart
    @hichaelmart
    Oct 29, 2025
    So I just discovered a 68% performance boost to Next.js and it all comes back to this (I dunno if they'll go for it though ๐Ÿ˜ฌ)
    47K
  • user avatar
    Michael Hart
    @hichaelmart
    May 3, 2024
    Replying to @threepointone
    Don't forget URLPattern too! No library needed, all comes for free โ€“ย super nice when you need to match on route parts.
    The MDN logo
    developer.mozilla.org
    URL Pattern API - Web APIs | MDN
    The URL Pattern API defines a syntax that is used to create URL pattern matchers. These patterns can be matched against URLs or individual URL components.
    12K
  • user avatar
    Michael Hart
    @hichaelmart
    Apr 27, 2022
    Oh, hey there ๐Ÿ‘‹. Just had a lovely 5 mth break ๐Ÿจโ˜€๏ธ, what'd I miss? No big changes I should know about? Well good, I'm back in NYC and happy to announce I've just started a new job at @Cloudflare as a Principal Engineer on the Workers team ๐ŸŽ‰
  • user avatar
    Michael Hart
    @hichaelmart
    Oct 27, 2025
    Replying to @hichaelmart
    I've made a PR to optimize some of that work. It currently creates 1745 ReadableStreams per request unnecessarily ๐Ÿ˜ฌ This fix eliminates that and you get a 10-38% perf boost (Deno users get the most!)
    Image
    Ensure getServerInsertedHTML skips rendering correctly by mhart ยท Pull Request #85394 ยท vercel/ne...
    From github.com
    99K
  • user avatar
    Michael Hart
    @hichaelmart
    Nov 25, 2020
    AWS us-east-1 went out with a bang ๐Ÿ’ฅ
    Image
Advertisement
Advertisement