[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

Code performance help please ( Google Maps InfoBubble

Richard Maher

8/26/2015 10:27:00 AM

Hi,

WRT: -
https://code.google.com/p/google-maps-utility-library-v3/source/browse/trunk/infobubble/src/infobubbl...

I'm desperate to improve instantiation time for all browsers but
especially (you guessed it) IE. It's the worst.

IE is at least 5 times as slow as any other browser (please NO "just use
the others" recommendations") but all browsers are slow and I can't see why.

What I have done so far: -

1) In my calling code I tested storing the resulting infobubbles in a
variable rather than my 2 dimensional Array Label Database - No
difference. Array growth/population not an issue.

2) Change the InfoBubble code to not add a CSS StyleSheet for EVERY
instance. This shaved about 15% off, so worthwhile but no biggie.

3) I thought I was onto a winner with InfoBubble.prototype.extend.
Surely copying every attribute could explain the performance differences
with all the MS crap? Sadly No. I replaced the Extend() method with a
one off InfoBubble.prototype = new google.maps.OverlayView(); and it
didn't amount to a hill o' beans.

So there you have it :-(

The only time I've seen performance like this was with trying to
build-up and tear-down collections (like for a Select) rather than newUp
an collection and replace it as a child.

It has to be some DOM manipulation but I just can see it :-(

Does anyone (except Wankers in Pajamas W1 and W2) have any useful
suggestions/recommendations?

BTW. The definition of "slow" here is 150 infoBubbles can take 13
seconds to instantiate. (While other work going on)