5 ms·
I think this is BS, practically all of the performance problems on the Web are related either to the DOM or CSS, which Web Workers can't fix. If you have a pho
by gridlockd 7y ago
I think this is BS, practically all of the performance problems on the Web are related either to the DOM or CSS, which Web Workers can't fix.
If you have a phone from 2014, something's gonna jank. It doesn't mean you're excluded. It means you'll have to live with jank. You'll get over it.
- chrismorgan 7y agoMany websites have too much of everything, but UI-thread JS is definitely the most common largest performance problem that prevents you from using pages. It’s the biggest thing where an architectural re-think has the biggest effect—though certainly just cutting down on all things will improve performance too.
- gridlockd 7y agoCan you show me an example? Like I said, I call BS on this. What website does a non-trivial amount of pure JS on the main thread? What even is the use-case? React reconciliation? Secondly, how does it prevent you from using a website? Sure, jank is annoying, but it doesn't entirely prevent you from using the site. Perhaps you give up on the site, but that's up to you.
- chrismorgan 7y ago> What website does a non-trivial amount of pure JS on the main thread? I challenge you to run a browser with no ad-blocker installed for one week, then block JavaScript (e.g. with NoScript; or with uMatrix and block scripts; or by setting javascript.enabled to false in Firefox). Your eyes will be opened at just how much JS is run and how much it slows things down. > What even is the use-case? Mostly analytics, ad-serving, privacy invasion and laziness/inefficient coding. > how does it prevent you from using a website? When it’s bad enough (which it often is, on slower mobile devices), you reach the point where you can’t perform tasks in a timely fashion. I chose the word “prevents” deliberately, because that is how it ends up.
- gridlockd 7y ago> I challenge you to run a browser with no ad-blocker installed for one week, then block JavaScript (e.g. with NoScript; or with uMatrix and block scripts; or by setting javascript.enabled to false in Firefox). I was looking for an example of a "bad website" that I could profile, not to see how disabling Javascript makes things faster. Of course it does make things faster. It also breaks everything. > Mostly analytics, ad-serving, privacy invasion and laziness/inefficient coding. I remain unconvinced that most any of this could be moved out to a web worker. It sounds more like a "death by a thousand paper cuts". > When it’s bad enough (which it often is, on slower mobile devices), you reach the point where you can’t perform tasks in a timely fashion. I do use slower mobile devices for testing other websites, I have yet to come across one site that's absolutely unusable. Granted, I didn't test the whole WWW. I'll ask you again: Show me one example of such a site, where I can fire up the profiler and observe that it's really the Javascript code and not the DOM or CSS/Layout reflows that's causing the performance issues. Only then can we start figuring out if Web Workers might help - which often they can't, because they are very limited.