The project I'm working on is what prompted the idea for using CSS for
animating things, as it has to shift a lot of elements around the
place.  I can't go into great detail because of the NDAs I have to
operate on but one feature is selecting products on criteria. As the
user changes the criteria items become hidden or shown, and shuffle
around the screen.  It was when I was stress testing this part of the
system that I discovered how much DOM access was going on.  If the
user made a choice that eliminated 40 items from a 120 item list then
the remaining 80 elements had to move to new locations and also change
size.  The fewer elements match the user's criteria the bigger they
are displayed.  This means 4 elements per element (width, height, top,
left) being changed, or 320 elements total.  Now the top and left are
unique to each element so there's little that can be done to cut the
workload down there, but all elements get the same width and height
changes.  If the width and height were animated through CSS then the
320 DOM operations per animation step are reduced to 162, a massive
saving on slow DOM operations.

On Jul 7, 1:40 am, "Benjamin Sterling"
<[EMAIL PROTECTED]> wrote:
> For the time being, I think it should be a plugin, maybe one that adds
> to/extends the .animate() function.
>
> But I would argue that there has to be some real world examples created.
> Maybe take a plugin that does some animation already and recreate it using
> the css method.  For instance, I have a site informationexperts.com that
> uses the accordian plugin, if we can recreate that plugin to utilize the css
> method, that we can really gauge the benefit.  The accordian plugin is only
> an example, I am sure there are a ton of plugin/situations that are already
> using current methods that can be recoded with the css method.
>
> This would really give us something to compare too, because moving 100 or so
> divs is one thing, having a real live site example is another.  Back to
> something someone said in an earlier message, some of these test are suspect
> and I feel you can only truly judge something once you see it on the playing
> field.
>
> On 7/6/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Ok, so to go back to the original intent of this thread:
> > Does it make sense to consider changing how jQuery (core) executes
> > animations?
>
> > Or is this something that should be a plugin?
>
> > It makes animations much more predictable and efficient, but are there
> > enough real world use cases.
>
> > Glen
>
> > On 7/6/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:
>
> > > On 7/6/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
> > > > I have a question.
> > > > Take a look at this page:
> > > >  http://www.commadot.com/jquery/animate/animatetest.htm
>
> > > Hey Glen, I liked your example, so I've taken it and applied the css
> > > animation concept.
> > >http://www.sunsean.com/animatetest.html
>
> > > The results are incredible.
>
> > > ~Sean
>
> --
> Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com

Reply via email to