/    Sign up×
Community /Pin to ProfileBookmark

How find if the computer your javascript/html is running on is slow?

I have some animation script that normally works perfectly. but on computers that are slower or low on RAM, it doesn’t work well so I instead want to have it snap the piece in to place instead of sliding it there.

But to do this, i need to be able to determine when a computer wouldn’t be able to display the animation due to slow CPU/GPU or low RAM. Any ideas?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@FangMay 22.2010 — The browser used can have a huge impact on the speed of animation.

Time the first few iterations of animation and change the method accordingly.
Copy linkTweet thisAlerts:
@nathanpcMay 22.2010 — As [b][color=brown]Fang[/color][/b] said, there isn't any event for that, what you could do is to check if the page have animations and things that will slow it. ?
Copy linkTweet thisAlerts:
@6tr6trauthorMay 22.2010 — Thanks to both for the suggestion. That's the solution I came up with too but I was hoping there was a better way to do it. There's a few issues with that method:

  • 1. There will be some lag by doing that

  • 2. It's possible that even on a good comp/browser, the first few iterations could be slow (maybe they're also running a huge process for a few seconds) and then it'd be fine
  • ×

    Success!

    Help @6tr6tr spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...