News for hackers. Stuff that matters.
Re:Next.js 9.4 – Fast Refresh, Incremental Static Regeneration by TechBro8615 on Monday May 11, 2020 @02:05PM (#23145093)
Can someone explain why 65kb is “a lot?” Even in 2001 on a “56k modem,” that would download in a little over one second.

It’s not like the 65kb here is 1kb for every N characters of text. It’s an overly simplified “hello world” example. The point is that you’ll still see sizes of around 65kb even with much more complexity than “hello world.”

Re:Next.js 9.4 – Fast Refresh, Incremental Static Regeneration by lhorie on Monday May 11, 2020 @02:36PM (#23145440)
There was another article here recently that is relevant[1]

One takeaway was that given a large sample of sites, the baseline size correlates fairly well with how the bundle size scales as projects grow. So if you have a 65kb baseline, you're more likely to end up with a larger bundle size in a "real world" project than if you used a framework with a 5kb baseline. The reasons are not clear (they could be anywhere from direct causation to indirect causes like incidental complexity due to some communities' higher likelihood of using libraries without auditing them), but the results are what they are, nonetheless.

Also, 65kb gzipped means you're running the uncompressed amount of JS. As a rule of thumb, the more JS you're running, the slower the site is going to be. This matters a lot for mobile, where JS execution speed can be absolutely abysmal (on top of slow network speeds, higher chance of resource timeouts, etc).

[1] https://timkadlec.com/remembers/2020-04-21-the-cost-of-javas...

Re:Next.js 9.4 – Fast Refresh, Incremental Static Regeneration by tomduncalf on Monday May 11, 2020 @02:08PM (#23145132)
Sorry to be pedantic as I agree with your wider point :) but a 56k modem was actually 56 kilobits per second so a theoretical max of 56/8=7 kilobytes/second. If memory serves correctly real speeds were more around the 4-5kb/s mark
Re:Next.js 9.4 – Fast Refresh, Incremental Static Regeneration by TechBro8615 on Monday May 11, 2020 @02:10PM (#23145146)
Ah you’re right :) I guess I was misremembering just how slow things were back then! I remember when forum threads would include “56k warning!” if they had a bunch of images.
Re:Next.js 9.4 – Fast Refresh, Incremental Static Regeneration by tomduncalf on Monday May 11, 2020 @02:18PM (#23145253)
Seems crazy to think that it was that slow eh? And these days I get annoyed when I get below 2 megabytes a second, lol
Re:Next.js 9.4 – Fast Refresh, Incremental Static Regeneration by pier25 on Monday May 11, 2020 @03:55PM (#23146255)
It's all relative of course but wouldn't you agree that 65kB of JS for a page that displays 1 line of text is a lot?

It's also 65kB of compressed and minified JS which ends up being about 185kB for doing absolutely _nothing_.

For comparison the complete jQuery library weights about 30kB compressed and minified.

Re:Next.js 9.4 – Fast Refresh, Incremental Static Regeneration by lern_too_spel on Monday May 11, 2020 @02:08PM (#23145128)
Because 65 kB is 65 kilobytes, not 65 kilobits.