Reputation: 179
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?
Upvotes: 1
Views: 1472
Reputation: 707716
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.
Upvotes: 5