[mapguide-users] Memory Issues 1.20beta2 with King Oracle v0.6.5
Zac Spitzer
zac.spitzer at gmail.com
Sat May 19 11:58:58 EDT 2007
I have just spent the last 12 hours getting a cold fusion / cfmx
wrapper on the java API
going to the point i can mimic the schema report (php geometry
previewer) in the latest beta.
Anyway, now that i got that going, i started to test an oracle spatial
layer. I am using
a web/map/layer in session resource. The dataset are the state
polygons for australia, which contains 12813 records (27 MB in shp
files).
Each time I fresh the map, mapguide adds another 30mb ram and 30mb
which doesn't get released
RAM VM CPU Time
Start Service 35 31 0.01
Load Preview(CF)* 48 41 0.01
Load Map 123 117 0.27
Load Map 155 152 0.52
Load Map 188 187 1.18
Load Map 221 221 1:44
Load Preview(PHP) 221 221 forgot to write it down :)
Count Features** 255 257 2.10
Load Map 287 291 2.37
*I checked this out and the memory increase only occurs for me on the
first request, it's not CFMx or the Java API, subsequent requests
might increase a little but it settles down.
** The schema report does a geometry count using
$featureReader = $featureSrvc->SelectFeatures($featuresId, $className, null);
while($featureReader->ReadNext())
$totalEntries++;
which ends up loading the whole record set into mapguide, which
doesn't get re-used when the map is rendered either.
I looked in the API round MgFeatureReader but i couldn't find any
reference to a getRowCount/Recordcount/Length functionality in there
doesn seem to be one.
I guess you could use MgFeatureService::ExecuteSqlQuery with count(*)
but it's late and i'm too tired, the feature capabilities would let
you find out.
I think it would be good for the api to have a recordcount function,
event if it's wrapping
MgFeatureService::ExecuteSqlQuery('select count(*)from table") but i
don't know much about the innards of FDO world.
So back to the memory stuff. I tried the Tasmanian SHP file in
mapguide which is about 8mb / 5886 rows (complex coastlines and they
are provided state by state),
i kept them as SHP ( i found the speed of SHP/SDF to be quite similiar
BTW) and as usual it's a lot faster in SHP land than Oracle and the
memory is released after the map is rendered. The CPU usage for with
SHP nothing compared to the Oracle ( and the oracle process was very
low)
I am using King Oracle v0.6.5 with 10g2 10.2.0.3, looks like it's got
a memory leak in there somewhere.
After about 15 refreshes of the map, memory hits over 600Mb and the
same in virtual memory. At which point it the mapguide service doesn't
respond anymore and kill from task manager is needed. there is nothing
in the mapgiode error log either.
--
Zac Spitzer
http://zacster.blogspot.com/
+61 405 847 168
More information about the mapguide-users
mailing list