Brandon,

I disagree with you. I've seen several cases where these two properties can take a second or two on documents with hundreds of nodes.

I agree that a test case or example file is needed so the community can verify it and do something about it.
 -Francisco

On 10/18/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
The offsetHeight and offsetWidth properties are very fast. Since I
can't see the code I assume your element is display: none;. That is
where the performance hit would take place, but even then it should be
minimal and not noticeable. I'm thinking there is probably something
else going on.

--
Brandon Aaron

On 10/18/06, Raziel Alvarez <[EMAIL PROTECTED]> wrote:
> After further tests I realize that most of the time is spent in getting the
> height and width of the passed element:
>
>      oHeight = e.offsetHeight;
>      oWidth = e.offsetWidth;
>
> Since this calculated by the browser I don't think there's much to do. What
> do you think? I'm using IE 6; I don't know if the same delay is present in
> other browsers (probably it is). Do you know of a more efficient way to get
> the width/height of an element; otherwise I can only think on doing some
> caching of these values.
>
> Thanks
>
>
>
> On 10/17/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> > Would it be possible for you to post a link so that we can see it or
> > at least maybe just a test case?
> >
> > --
> > Brandon Aaron
> >
> > On 10/17/06, Raziel Alvarez <[EMAIL PROTECTED] > wrote:
> > > Hi,
> > >
> > > I'm performing css manipulation in my application, but the performance
> > > degrades considerably fast as more markup is added. I tracked the
> problem to
> > > the jQuery.css function, specifically for those cases where I'm setting
> the
> > > width and height. Even small additions to the markup inside of the
> container
> > > to which I want to set the width and height produce a big increase in
> the
> > > delay of such function.
> > >
> > > I took a quick look at the implementation and they seem to be special
> cases,
> > > and since I don't quite get the logic inside I don't feel comfortable
> > > changing it.
> > >
> > > My application is getting to the point of being useless because of the
> > > delay. Is there a plan to fix this in the next release? Is there any way
> > > this can be improved meanwhile?
> > >
> > > Regards,
> > >
> > > _______________________________________________
> > > jQuery mailing list
> > > discuss@jquery.com
> > > http://jquery.com/discuss/
> > >
> > >
> > >
> >
> > _______________________________________________
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
>
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



--
Francisco Brito

software:             http://nullisnull.blogspot.com
photography:           http://www.flickr.com/photos/darkgoyle
everything else:   http://brito.mindsay.com
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to