Re: [OpenLayers-Users] Performance and Memoryusage measuring: How To

2009-05-14 Thread Kris Geusebroek
Hi all,

Sadly i didn't get any replies on this mail so I investigated further
myself and found a partial solution.
It seems that IE leaves a reference to the element which is removed with
the removeChild method.

Since this method is heavily used in OpenLayers refreshing a layer often
will add Dom elements to the memory all the time.

I created a patch to replace the removeChild method (at least the cases
where an element can be removed really) by a utility method which really
removes an element.

I attached a patch file to this email for those who are in need of a
solution.
Still there's a small amount of memory added on every refresh (talking
about 40-100 kB every refresh) which I'm not able to pinpoint.

QUESTION: is there any tool which I can use to inspect the memory and
see which elements are using memory??

Cheers Kris

-Original Message-
From: users-boun...@openlayers.org [mailto:users-boun...@openlayers.org]
On Behalf Of Kris Geusebroek
Sent: Friday, May 08, 2009 4:14 PM
To: pe...@peterse-uithuizen.com; OpenLayers mailinglijst
Subject: Re: [OpenLayers-Users] Performance and Memoryusage measuring:
How To

Hi all,

Ive tied out sIeve to measure leaks and memory usage of my OpenLayers
client and see some strange things.

I have a Vector layer with bbox strategy and wfs protocol that refreshes
every 5 seconds.
I have points wit h labels and some background image/stroke etc.

If I zoom in on 1 feature every refresh 7 dom elements are added to the
#inUse.
If I check the in use elements I can see references to the previous id's
marked orphan and some not marked orphan (the reason for them is the
removeChild isn't called but they are mostly childs of orphan's).

However memory is not freed at all. Memory is only freed as I browse to
other page (about:blank for example). But not all of the used memory is
freed.
Also when unloading my client a few (23) leaks are reported but not more
info.

Few questions:
How can I see what the memory is used for? are there other tools to see
memory use of the app.
Should I care about the orphaned dom elements and children of them?
How can I  see what the leaks are about?

Any help Is much appreciated (been banging my head all day now)

Cheers Kris





___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


removeChild-memoryleak-version2-excl.patch
Description: removeChild-memoryleak-version2-excl.patch
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Performance and Memoryusage measuring: How To

2009-05-08 Thread Kris Geusebroek
Hi all,

Ive tied out sIeve to measure leaks and memory usage of my OpenLayers
client and see some strange things.

I have a Vector layer with bbox strategy and wfs protocol that refreshes
every 5 seconds.
I have points wit h labels and some background image/stroke etc.

If I zoom in on 1 feature every refresh 7 dom elements are added to the
#inUse.
If I check the in use elements I can see references to the previous id's
marked orphan and some not marked orphan (the reason for them is the
removeChild isn't called but they are mostly childs of orphan's).

However memory is not freed at all. Memory is only freed as I browse to
other page (about:blank for example). But not all of the used memory is
freed.
Also when unloading my client a few (23) leaks are reported but not more
info.

Few questions:
How can I see what the memory is used for? are there other tools to see
memory use of the app.
Should I care about the orphaned dom elements and children of them?
How can I  see what the leaks are about?

Any help Is much appreciated (been banging my head all day now)

Cheers Kris





___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Performance and Memoryusage measuring: How To

2009-05-04 Thread Peter Peterse
Hello,

I've used sIEve to check memory leaks.
http://home.orange.nl/jsrosman/

Goodluck with it.

Peter


 Hi all,



 I've written an app with openLayers and Geoserver and created a lot of
 functions in javascript.

 I want to measure performance and see if no memoryleaks are introduced
 by me ;-)



 What is the best/easiest way to measure these things (in IE at least
 since client depends on IE)



 Cheers



 Kris Geusebroek

 Consultant





 Email: kgeusebr...@xebia.com mailto:kgeusebr...@xebia.com

 Tel: +31 (0)35 538 1921

 Fax: +31 (0)35 538 1922

 Mobile: +31 (0)6 30 697 223

 http://www.xebia.com http://www.xebia.fr/



 Utrechtseweg 49

 1213 TL Hilversum

 The Netherlands



 Xebia Blog !   http://blog.xebia.com/ http://blog.xebia.com/

 Xebia Podcast!   http://podcast.xebia.com/ http://podcast.xebia.com/



 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users



___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users