1

I am converting a flash site to js and there is alot going on:

Constantly running dynamic background, running on jquery. Site calls hundreds of images via ajax API. Mouse over images, calls more ajax to grab bigger version and display that as an overlay, with a nice animation sequence. Lots of mouse positioning calls for figuring out if the mouse is still over an image covered by an overlay.

But some animations are getting jumpy even with easing. Is this the point to stop with js?

3
  • 1
    if it too much now a days browser will say a script is running which is taking too much of time Commented Apr 12, 2012 at 18:55
  • My philosophy is to use what you need. If you can remove CPU-heavy functions and still achieve the goals of your site, then do so. If you need some heavier functions to do what you want to do, than use them. Just keep in mind that one of your goals is that the users of your site can use your site. Commented Apr 12, 2012 at 19:00
  • Jumpy animates tend to have more to do with the size and number of images and/or dom elements rather than the amount of javascript. Commented Apr 12, 2012 at 19:01

1 Answer 1

5

There is no specific answer to this question (and perhaps it's not a good question for stackoverflow's Q&A format). There is no problem with having lots of javascript that's all used for different things. Today's browsers are very capable of handling that.

The first issue for you is the initial load time for the site when nothing is cached. If you have too much script and images and the site takes forever to get off the ground, then visitors will give up on you before they get going.

The second issue is really just evaluating each single operation and working on the ones that feel sluggish or don't look right in slower browsers. Any given operation can nearly always be improved with smarter development or developing an adaptation strategy when you detect things are slower.

The third issue is making sure you have something that makes sense for mobile. What you can get away with on the desktop in terms of download size, script execution and performance is not necessarily going to be OK on mobile.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.