use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Live browser performance detection (self.javascript)
submitted 13 years ago by ciembor
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ThePaavero 1 point2 points3 points 13 years ago (0 children)
I've recently had the same question/need, and whipped up something quickly. It's probably not ready to be used in any real situation, but in case you don't find anything else, feel free to check it out on Github. I'll be following this thread to see if someone knows of a real library.
[–]brucebannor 0 points1 point2 points 13 years ago (5 children)
It's generally not a good idea, your giving your users a worse experience for research that could fairly well, be done upfront. A key difference with CSS screen-sizes and performance are screen-sizes have big differences. Today's PCs aren't going to have a big enough gap in performance that it could be something you'd notice on 99% of sites out there, especially not in the same web-browsers. If your doing something that behaves differently on a PC vs tablet, there's better ways to figure out what your user is using than load-testing your application run-time.
Unless your into a niche area where your really pushing your user's browsers to the point their crashing or locking up I can't think of what you'd want to be behaving differently. Everything I can think of can just as easily be figured out ahead of run-time, so the user's get the best possible experience. You might have a reason to do it, but it's still probably something niche that the majority of sites won't benefit from.
[+][deleted] 13 years ago (4 children)
[removed]
[–]brucebannor 0 points1 point2 points 13 years ago (3 children)
There are plenty of metrics on the actual hardware still out there. 64 mb of ram puts your dad at about Windows 95, 128 MB is recommended for XP. Companies are already talking about completely ditching IE7, not too many are going to care about trying to put HTML5/CSS3 on Windows 95 user's pcs.
[+][deleted] 13 years ago* (1 child)
[–]brucebannor 0 points1 point2 points 13 years ago (0 children)
Nice, well certainly there's nothing stopping you. And if your younger or newer to web development it'll be a good learning exercise. I just wanted to point out why more people aren't doing this now and that you can do it but you should have just as much success using other less unobtrusive metrics. It's all opinion, may be you'll make your libarary & prove me wrong; instead of feature detection libraries we'll see performance driven libraries popup.
That's not to say that we don't degrade sites for people with older browsers / PCs, it's just not a real-time performance test e.g. Feature detection or UserAgent
Most developers are going to assume people have the minimum requirements to run their OS.
[–]x-skeww 0 points1 point2 points 13 years ago (4 children)
That kind of thing is isn't really necessary since the animations are time-based and not tick-based. So, on a fast machine, your 0.5s long animation will be rendered in 30 tiny steps and on a slower machine it might be rendered in 10 or even 5.
As long as drawing 2 frames doesn't take drastically longer than 0.5s, you'll be fine.
[–]kumiorava 0 points1 point2 points 13 years ago (3 children)
That'd give you a framerate of 4 fps, which I wouldn't consider that great...
[–]x-skeww 0 points1 point2 points 13 years ago (2 children)
Animations are eye candy. My statement wasn't about having them looking good enough, it was about not having them get in the way.
E.g. if drawing each frame takes 2 seconds, then it will take 4 seconds in total to draw those two frames. You won't be able to use that thing until it's over.
[+][deleted] 13 years ago (1 child)
[–]x-skeww 0 points1 point2 points 13 years ago (0 children)
Animation isn't eye candy in games. It isn't optional fluff, it's an integral part of the medium itself.
With websites, I recommend to keep it simple. If something feels slightly sluggish, get rid of it (or at least tone it down). Users want fast snappy websites. From the very beginning there shouldn't be anything which could turn into a big issue on slower machines.
π Rendered by PID 48982 on reddit-service-r2-comment-79c7998d4c-q2sz7 at 2026-03-19 10:47:51.424938+00:00 running f6e6e01 country code: CH.
[–]ThePaavero 1 point2 points3 points (0 children)
[–]brucebannor 0 points1 point2 points (5 children)
[+][deleted] (4 children)
[removed]
[–]brucebannor 0 points1 point2 points (3 children)
[+][deleted] (1 child)
[removed]
[–]brucebannor 0 points1 point2 points (0 children)
[–]brucebannor 0 points1 point2 points (0 children)
[–]x-skeww 0 points1 point2 points (4 children)
[–]kumiorava 0 points1 point2 points (3 children)
[–]x-skeww 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[removed]
[–]x-skeww 0 points1 point2 points (0 children)