Re: [jQuery] Jquery.css function poor performance

2006-10-18 Thread Raziel Alvarez
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 orat least maybe just a test case?
--Brandon AaronOn 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 listdiscuss@jquery.com
http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Jquery.css function poor performance

2006-10-18 Thread Dave Methvin
 
 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;
 

As Brandon says, please post a link to a test page so we can take a look.


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


Re: [jQuery] Jquery.css function poor performance

2006-10-18 Thread Francisco Brito
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.
-FranciscoOn 10/18/06, Brandon Aaron [EMAIL PROTECTED] wrote:
The offsetHeight and offsetWidth properties are very fast. Since Ican't see the code I assume your element is display: none;. That iswhere the performance hit would take place, but even then it should beminimal and not noticeable. I'm thinking there is probably something
else going on.--Brandon AaronOn 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.comhttp://jquery.com/discuss/-- Francisco Britosoftware:
http://nullisnull.blogspot.comphotography: http://www.flickr.com/photos/darkgoyleeverything else: http://brito.mindsay.com

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


[jQuery] Jquery.css function poor performance

2006-10-17 Thread Raziel Alvarez
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 smalladditions 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/


Re: [jQuery] Jquery.css function poor performance

2006-10-17 Thread Brandon Aaron
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/