4 ms·
I'm not convinced that such a number could be calculated in such a way that wouldn't be utterly meaningless to all but the biggest nerds. The resources a 'web
by KyeRussell 8y ago
I'm not convinced that such a number could be calculated in such a way that wouldn't be utterly meaningless to all but the biggest nerds.
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.
- pdkl95 8y ago> such a number could be calculated 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).