rcaguirreg / geoxml3

Automatically exported from code.google.com/p/geoxml3
0 stars 0 forks source link

Reduce/optimize memory utilization especially on mobiles #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using geoxml3 and would like to reduce/optimize memory utilization, 
especially on mobile devices.  I'm particularly interested in the memory 
footprint after reading the KML file, and having created the map with all the 
markers.

According to Firebug, these objects still exist after the map is generated (and 
some time allowed for gc).  Is it possible that you still have references to 
these objects after building the map (i.e. after geoxml3.parse())?  I am 
maintaining a reference to the geoxml object, as I want access to the markers.

fetchers[]
styles[]
nodes[]

placemarks[]
groundoverlays[]
ggroundoverlays[]
gpolygons[]
gpolylines[]

Possibly, the second set are items that a API consumer may want to use.  But 
the first set are internal items, without API references.

Several questions:

1) Is it possible for you to clean up any (large) internal structures after 
parse()?

2) Can you add a parse option to clean up other structures?

3) Or should  just go with a marker manager and de-reference my geoxml3 object?

Original issue reported on code.google.com by johnbyr...@gmail.com on 11 Oct 2011 at 2:45

GoogleCodeExporter commented 9 years ago
Can you just keep a reference to the markers array and allow the geoxml3 object 
to go out of scope and be garbage collected (or delete it)?

Original comment by geocodezip on 13 Oct 2011 at 2:20

GoogleCodeExporter commented 9 years ago
Yes I can do that no problem.  I guess I was checking to see if that
approach was your intention (i.e. what I should be doing).

Original comment by johnbyr...@gmail.com on 13 Oct 2011 at 2:01

GoogleCodeExporter commented 9 years ago
I took the maintenance of this project over from Sterling Udell.  Its original 
goal was to provide Kml support to the v3 API before KmlLayer existed.  My main 
interest was in adding the polyline/polygon functionality to it.
Please let me know if how it works out, or if you have other suggestions.

Original comment by geocodezip on 13 Oct 2011 at 2:21

GoogleCodeExporter commented 9 years ago

Original comment by geocodezip on 23 Nov 2011 at 3:57