Antônio Gomes wrote:
In this case, comparing to opera :). I mean, around 10 seconds slower using the 1st approach and 1 or 2 seconds slower using the 2nd one (bellow) - I am zooming gmail (100 emails per page).

Huh. Do you see the same performance difference if you use intrinsicWidth (and cache it) vs using width all the time?

Also, what Gecko version is this, just so we're on the same page?

Hummm, it is dated from nov/05. Pretty old indeed. I am about to update asap to 1.8 branch.

Ah.  Anything 1.8-ish should be ok as far as I'm concerned.

Is this actually faster than the other approach??

Yep, it's like 65% faster than the former one. I got the intrinsic size once, caching them (instead of getting it from the DOM GetHeight|Width) and set them when it's needed.

Yeah, that would be faster than refetching the current size all the time -- you're just doing less work.

Is there any drawback from this, like mis-synchronization between my cache and the DOM if this got changed somehow| (or by something) beyond my zooming ?

Intrinsic size of images is immutable.

-Boris
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to