7 ms·
Bad month for the main thread
- lmm 9y agoGiven that components are going to need to contain Javascript, what's the value in having them contain separate HTML? "Browsers are good at handling documents" isn't really true any more; at least, browsers don't seem appreciably better at handling documents than Javascript is.
- MaxBarraclough 9y ago> browsers don't seem appreciably better at handling documents than Javascript is If you disregard memory consumption, CPU load, battery life, then sure.
- lmm 9y agoEven then. I was surprised to see doing a given thing in Javascript perform better than doing it in CSS, but that seems to be the reality of browser implementations.
- AHTERIX5000 9y agoWhat is it exactly the added bonus _users_ get with the modern way of web development that wasn't there in, say 2011? I remember using Android 2.x with 800 MHz SOC back in the day and web browsing worked fine, really. What modern web sites can offer to justify the increased CPU usage?
- dijit 9y agoI suppose now you can play 3d games? Watch videos without flash? I don't think you can claim that the way we use the internet in 2018 is the same as how it was in 2001, we assume "web apps" for things like mail, editing documents and other things will work. Now, I absolutely detest the insane complexity of a browser and that I can't have a 'lite' browsing experience today without sacrificing access to a large portion of the internet. (which I blame on the prevalence of javascript) But do enjoy the 'no download', 'run anywhere' nature of web-applications, and, often, I'm willing to trade a bit more power for them, because as a heavily BSD/Linux user the alternative is not having anything at all. The question is, how can we penalise those that abuse the power of a browser without offering value?
- rsynnott 9y ago> The question is, how can we penalise those that abuse the power of a browser without offering value? "Do you want to enable Javascript for this website?"
- andrewmcwatters 9y ago> I suppose now you can play 3d games? No one does this. We have Steam, GOG, Origin, etc. Why use a substandard implementation of GL? > Watch videos without flash? This was possible of out the box in 2001's Windows XP with Internet Explorer. You just used <object> instead of <video>, have people forgotten this? Nothing has significantly changed in the last decade or more, except for the fact that people think sending several megs down the pipe is acceptable.
- toyg 9y ago> > I suppose now you can play 3d games? > No one does this. I'm afraid you're wrong there. Browser games are wildly popular around the world, even 3d ones. You're also failing to mention that <object> required non-standard third-party plugins installed. The novelty of <video> is that browsers are supposed to guarantee those tags will work all the time, without any extra effort required. That is a big step forward, although more from a political rather than technical point of view. It's a dramatic step forward in security, among other things. > Nothing has significantly changed in the last decade Sounds very much like "any technology introduced before you're 30 is natural and necessary; anything developed later is an abomination and should be banned" :) I hate to say it, but the world has changed in the last decade: the iPhone happened. People now experience computing through mobile first. GMail and GMaps had already changed what people expect from the web, but mobile completed the upheaval. We can disagree on the direction of travel (JS becoming the assembly of the web is, imho, a perversion; like http 2, it feels like an expensive hack implemented on top of technologies that were not meant to be used like that), but saying that nothing has changed is simply wrong.
- lallysingh 9y agoThese are means to reduce development and maintenance costs for a given capability set. Users can get more website functionality without raising their costs (typically paid in ads, reduced content, be our actual $). After taking into effect websites that actively lost money before.
- ashleyn 9y agoA saturation of rich media ads. 2% of CPU to render the news article. 98% to play 3 malfunctioning videos of Santa having a Coke, complete with loud audio.
- daxfohl 9y agoI actually recall this being worse years ago than now.
- megaman22 9y agoYears ago, you could just disable/not install RealPlayer, or Shockwave, or Flash or Silverlight, and videos just wouldn't play.
- daxfohl 9y agoYeah, at the time I didn't understand the HTML5-all-the-things craze. To me at the time, it seemed silly. No new functionality, but "now in JavaScript" (which was much worse performing and nastier to work with back then). It seemed very cargo cultish. Granted I think it worked out better in the end, as we now can maintain all UX functionality in a single project rather than having to split across various plugins. But you're right. I didn't foresee the side effect but it's notable: now it's impossible to kill these ads so easily anymore. Granted, the advertisers would have figured this out and redone everything in JavaScript by now regardless.
- deleted 9y ago[deleted]
- daxfohl 9y agoI think they get more functionality faster. As a developer I find it much faster to iterate on a SPA architecture than on the server-side rendering model. Plus if you ever make native apps, it's nicer to manage a single REST API on the server side, rather than bifurcate into an API model and a DOM model. And you can generally get "good enough" performance that way without too much difficulty. Given performance of most devices, I'd say pushing UI from the server side as a performance optimization is high effort low reward in most cases. Unless performance is one of your major differentiators. That said, there are certainly some sites that miss the performance boat completely such that their sites are almost unusable on lower power devices. It's a tradeoff.
- Joeboy 9y agoIMO the main purpose of web design has always been to signal that the site is a "legitimate" entity, ie. run by people with sufficient clout to pay professional designers to keep up to date with the latest fashions. Users like those signals, and will say things like "lol, 2011 called and it wants your site back" if you don't play the game.
- rmrfrmrf 9y agoWhat can we blame on JavaScript next?
- arghwhat 9y agoThe author presents a problem in the lack of device model and battery level information. A website/web application may disable functionality due to browser feature availablity, but if you disable functionality based on the device model, you're doing something wrong. If you have a scenario where you can disable some thing to make the experience better while maintaining functionality, then why in the world would you ever enable those things? This is simply beyond me. Any suggestions that improve the situation are simply generic performance optimizations that benefit everyone.
- Cyberdog 9y agoOn the other hand, if the idea of sending mobile devices with low batteries simplified versions of web sites catches on, we could have our desktop browsers spoof to be four-year-old iPhones with 10% battery life and perhaps have a much better and faster desktop experience…
- arghwhat 9y agoWhat a world we live in...
- debacle 9y agoJust discovered the slider. What a huge performance boost.
- deathanatos 9y ago> It isn’t far fetched that a device would reduce power consumption when on battery, it makes the device last longer, makes users happier. Does it? If I reduce the amount of power available to complete a task, but proceed to complete the task anyways, doesn't the phone now need to potentially have the peripherals (particularly, the screen) on for longer as the user waits for a task that has been slowed down to complete, consuming more energy than had it completed the task using 100% CPU? (Unless using 80% of the CPU can accomplish the same task using less energy (not power) and recoup enough to make up for the losses incurred by needing extra time.) It isn't intuitive to me at all that what we're doing isn't making phones useless so that their battery lasts all day.
- jerf 9y ago"It depends": https://pdfs.semanticscholar.org/6611/bc084fbaf1845b1bf54cc72d1c143d25083d.pdf https://pdfs.semanticscholar.org/6611/bc084fbaf1845b1bf54cc7... From the abstract: "We evaluate three systems - a clock throttled Pentium laptop, a frequency scaled PowerPC platform, and a voltage scaled system.... on the Pentium-based system, it is energy efficient to run only at the highest frequency, while on the PowerPC-based system, it is energy efficient to run at the lowest frequency point." So it can go either way, depending on a lot of the local factors.
- daxfohl 9y agoI'm not an expert, but I think the high-power modes do things like very aggressive caching and branch prediction, etc. to speed things up. So there's a bunch of energy spent on e.g. transferring and storing memory that may never be used, or computing branches that may never be hit. Lower power modes don't do this as aggressively, so they only consume energy for results that will be used. Plus I'm pretty sure your base voltage has to be higher to run at higher frequency, and non linearly so, to counter various electrostatic effects.
- deleted 9y ago[deleted]
- ggg9990 9y agoNot really. Most people are not computing primes on their phones, they are surfing Facebook and Instagram. Since it’s a pointless activity there isn’t the concept of “completing a task” — they will just think “I Facebooked for three hours instead of 2” instead of “I got to see 500 photos in 2 hours rather than 400 photos in 3 hours.”