“Tecno Spark 8C, a low-spec phone that can hit 40 FPS in Battle Royale PUBG but lags below 1 FPS on social media”
19 replies
-
@zachleat developers and software publishers need to realize that everyone don't have high end, multicore, 5nm cpu with 32gb RAM.
This thing -> https://upstash.com/ for example consumes 50mb heap on startup, for displaying a "static" landing page 😭😭😭 (I believe a vast amount of this insane memory consumption is caused by telemetry, session replay and other sneaky stuffs that companies shouldn't do)
@zachleat not entirely related to the article, but I believe, developer tools should also focus on reducing size and compute overhead.
Going by https://www.11ty.dev/docs/performance/ , 11ty have like 34mb of node_module while gatsby (biggest piece of horseshit I've ever used 🤮🤮) have half a gb for the same.
@nrk9819 Looking at node_modules size is a silly measure of bloat. Adding a great build tool like esbuild as a dependency, for example, downloads native binaries for every platform and so is huge. Does that mean using esbuild is bad and your project is bloated?
@alannorbauer @nrk9819 I would acknowledge that the original post (on front-end performance) does not strictly relate to node_modules size, installation, or build performance.
I would argue that node_modules size is worth measuring!
As to whether “software bloat” extends to your dependencies, I would also argue that it does! More dependencies, more maintenance.
I’m assuming there is a relationship between dependency count and file size, here. Maybe not with esbuild, but generally.
@zachleat @nrk9819 Agreed, so let me reword what I said:
*Only* looking at node_module size is a silly measure of bloat. (Because the entirety of it might be something like native binaries for multiple platforms).
34MB could be 1000 terrible dependencies. 500MB could be one great dependency. The size, entirely on its own, is only a hint and it’s super silly to dunk on a package for that alone.
@alannorbauer @nrk9819 that might be true!
My hunch is that those are outliers and not typical—but maybe!
Someone should do a https://github.com/wooorm/npm-esm-vs-cjs -style analysis but for dependency count versus file size! 👀
@zachleat @nrk9819 Surely. But the existence of outliers tells us node_modules size is (at most) correlational with good build speeds and small output bundles. It is not causal.
Meanwhile, web page payload size has a *causal* relationship with performance.
The distinction is important if this isn’t to be some silly aesthetic preference, which I suspect for some people it is.
@alannorbauer @nrk9819 ah hmm—well, this doesn’t fit my experience. It doesn’t seem to fit the example cited in @nrk9819’s original post either?
Either way I’m fine with disagreeing on a thing (and I’ve hit my text reply limit here)—appreciate the discussion!
(Though I suspect we agree more than this discussion might suggest!)
@zachleat Ok Tom
@zachleat The web itself is fast. Ads and their tracking, unnecessary feature cruft, frameworks needlessly throwing objects around and trying to take more control of the DOM than necessary and a lack of deferred loading strategy make it slow.
@zachleat We've collectively completely failed as an industry
@JackEvans Failure is temporary as we move away from tools that have proven to be less than ideal—I remain optimistic!