[mapguide-users] RenderMap: MgOutOfMemoryException
Benoit Begin
bbegin at geomapgis.ca
Thu Aug 27 12:20:06 PDT 2020
I can definitely confirm that rendering large map images via the API is
definitely memory intensive on the Mapguide site. Then when you get the
image out into .NET, you might even go into deeper problems with the way the
Large Object Heap collection works and so on. You can end up with pretty
massive amounts of memory in there if your code is running in a service or
something where memory collection can be more harduous.
You could look into creating smaller tiles and stiching them up for the
resulting image. It might keep memory usage under control. Perhaps limiting
the map images to boxes of 2048x2048 and then tiling them back into a single
image. It does require a bit of math and finagling, but definitely worth the
trouble.
There might also be some issues on depending on what kind of app this code
runs. If it's a web app, if 2-3 users end up asking for the same large image
within a similar timespan, it could get crazy. So that's something that
generating smaller tiles might help out with.
Hope the idea helps out!
--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
More information about the mapguide-users
mailing list