News for hackers. Stuff that matters.
Re:Next.js 2.0 by jonknee on Monday March 27, 2017 @01:05PM (#13969520)
This page has some huge issues loading resources. I kept it open as a tab to dive into later and noticed it was still spinning after a long time... I refreshed with Developer Tools open and after 2 minutes over 100MB had been transferred!

It appears the screencast video is to blame, it is not only huge (~70MB), but it keeps getting downloaded instead of just replaying. I just checked the console again and the page is now up over 300MB downloaded. Glad I wasn't on mobile data!

Update: I downloaded the video and ran it through ffmpeg to see how much space could be saved... Original size 72.2MB, new size 1.7MB. Screencasts obviously compress very well, but this was pretty surprising. You could easily optimize this down further and probably half the size yet again.

   ffmpeg -i hello-world_2.mp4 -vcodec libx264 -preset veryfast smaller.mp4
Re:Next.js 2.0 by Rauchg on Monday March 27, 2017 @05:28PM (#13971934)
Re:Next.js 2.0 by BinaryIdiot on Monday March 27, 2017 @02:50PM (#13970550)
> It appears the screencast video is to blame, it is not only huge (~70MB), but it keeps getting downloaded instead of just replaying.

Question, do you have caching disabled when devtools is open? If so that'll cause it to continually re-download. Looking at the markup it shouldn't redownload but devtools will make that happen quite easily.

Completely agreed about the size though; geeze.

Re:Next.js 2.0 by user5994461 on Monday March 27, 2017 @03:38PM (#13970980)
Devtool doesn't impact caching.
Re:Next.js 2.0 by nostoc on Monday March 27, 2017 @03:51PM (#13971081)
Unless, of course, you have the "Disable cache" checkbox enabled.
Re:Next.js 2.0 by iancarroll on Monday March 27, 2017 @03:51PM (#13971085)
It does when you click "Disable cache" (and maybe forget to turn it off). But it doesn't appear to affect this, at least.
Re:Next.js 2.0 by Kiro on Monday March 27, 2017 @03:54PM (#13971103)
Why do you post about things you obviously have no clue about? Any web developer knows that you use DevTools to disable caching.
[dead]
Re:Next.js 2.0 by BinaryIdiot on Monday March 27, 2017 @06:53PM (#13972552)
> DevTools on Chrome doesn't disable caching. There is a button to disable cache that's off by default.

I simply asked the poster if they had caching disabled when they had devtools opened as I ran into this exact issue before. Why does the default matter if I asked them if they had it enabled?

I don't really understand what you're trying to get at with your series of replies.

Re:Next.js 2.0 by sctb on Wednesday March 29, 2017 @02:39PM (#13989254)
Personal attacks are not OK on Hacker News, and if you won't stop breaking the guidelines we have to ban the account.

https://news.ycombinator.com/newsguidelines.html

Re:Next.js 2.0 by timneutkens on Monday March 27, 2017 @01:50PM (#13970025)
We're on it, thanks!
Re:Next.js 2.0 by eclark on Monday March 27, 2017 @07:38PM (#13972781)
The size is much smaller.

As for downloading multiple times: I don't think it's happening though it looks like it.

The server is sending 206 Partial Content for the video. This is why the file downloads multiple ranges if the page is left open for a while. The first response if for a chunk of the file. The next few are for different chunks. Then it repeats.

~8 Mins on the page and I have 5 downloads of the hello-world_2.mp4 that went to the server. I have 4 that were able to be served from the disk cache.

Re:Next.js 2.0 by heipei on Monday March 27, 2017 @04:25PM (#13971423)
Not just that, also rather large fetch (AJAX) requests to get all of the JavaScript, or so it seems: https://urlscan.io/result/36f1ada1-a7d1-4b4f-8e65-8269135e10... (gotta be a new record for initial page load size)
Re:Next.js 2.0 by grigio on Monday March 27, 2017 @01:11PM (#13969602)
I confirm, the video is too big
Re:Next.js 2.0 by asaddhamani on Monday March 27, 2017 @02:43PM (#13970493)
It really is a sad state of affairs that this is unsurprising.