It could be a score based on asset sizes, memory impact, cpu impact, etc.
By making it visible, people would be more cognizant of which sites have poor experiences or have a big impact on their computer.
It could be a score based on asset sizes, memory impact, cpu impact, etc.
By making it visible, people would be more cognizant of which sites have poor experiences or have a big impact on their computer.
You can't simplify this problem down to "This uses more RAM than an arbitrary threshold therefore it's a problem." If I spend 99% of my time using an app then I want it to cache hundreds of megabytes of data in to memory so I can work fast. Saying it's a bad experience if it does that is wrong.
I'd add to it the slider "cache this app more-less", because you know how do you usually use this app or page.
And the "complain" button with auto-redirect to some support, or uservoice form of this app, if there is any, when e.g. I moved the slider to the "less" as possible and even then it still eats 200 megabytes of RAM.
Gmail is still using an estimated 80MB for what FastMail needs only 11MB for.
Where is this 80MB coming from? Is it caching 80MB of emails? I think not. You’ll be lucky if that 80MB corresponds to even half a megabyte of email.
Most high memory usage is not because it’s caching things so it can work fast. Most high memory usage is simply because the app is inefficient.
The resources a 'web app' 'should' use is highly context dependent. As a web developer, I can determine some of that context, as I know what functionality is resource intensive. I don't think that you can distill that down in any useful way.
Compute this from the start of page load. Adjust the scale of the final output if desired.
# automatically scaled to local hardware
# in units the user actually experiences
t := "total wall-clock CPU time used (in ms)"
# yes, allocations - NOT total usage
m := "Total heap allocations (in kB/kiB)"
# magnitude of about:blank
a := typical_m_for("about:blank") *
typical_t_for("about:blank")
# score is computed similar to decibel
score := 10 * log10( (m * t) / a )
A variant of the score that excludes media data in <audio> or <video> tags should also be computed. Both versions should be presented.Continuously update these numbers, so the user can see the impact of any background JS/etc.
> utterly meaningless to all but the biggest nerds
Please don't assume people are stupid. If you give people real data consistently and it affects their life, they will figure out how to use it. Their interpretation may not be technically rigorous, but it will mean something to them. Also, most people will understand and expect the score for youtube to be (much) larger than a messaging service like twitter and both larger than a simple static text-only page.
> as I know what functionality is resource intensive
You only know this an isolated abstract sense. You do NOT know how much network bandwidth, CPU time, or RAM the user actually has available and wishes to use for you page. They may be using their bandwidth for other important things on another computer. Their RAM an CPU might be needed for other uses - inside or outside the browser.
Approximately nobody only uses one application at a time. Your app or webpage is almost always going to be competing for resources in an environment you do not control and can never truly understand (you do not know the user's ultimate goals, environment, or requirements/restrictions).
They don't care because it's not a problem for them. Yeah, maybe they could have bought a cheaper phone if everyone had spend twice as much time writing the code. But hardware advances have actually caught up with requirements (and then some), and all these sites work fine on even lower-end current phones.
You care about it like a watchmaker cares about the mechanical drive of his watch.
They don't need a watch. They have smartphone. It's 8 magnitudes more precise than your mechanical watch.
It's just regular users know so little about technology that they accept what they're given without any question. "Thinks work slow so it's definitely the fault of my computer, maybe it has viruses".
I wish I knew how much each site/domain was costing me. Then I could have a better idea which sites are profligate wastrels to be avoided and which sites I can feel free to visit at will.