[mapguide-internals] Code review request: remove unnecessary loop to improve the performance

Buddy Hu Buddy.Hu at autodesk.com
Mon Aug 1 03:57:55 EDT 2011


Very little! After my testing with 100 layers, the result shows there is only 2-3% improvement when stylizing layers.
However in theory, remove these loop is helpful for us. 
Before invoke GetResourceContents(), we need 2 nested loops to prepare the layerIds.  And in the GetResourceContents() function ,we also need 2 nested loops to get each layerId from layerIds.
Why don't we use GetResourceContent() function to avoid these loops?

Regards,
Buddy

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Zac Spitzer
Sent: Monday, August 01, 2011 3:41 PM
To: MapGuide Internals Mail List
Subject: Re: [mapguide-internals] Code review request: remove unnecessary loop to improve the performance

purely out of curiosity, whats the performance difference?

On Mon, Aug 1, 2011 at 5:31 PM, Buddy Hu <Buddy.Hu at autodesk.com> wrote:
> Hi lists,
>
> I add an new patch "Remove-loop.patch" for you review in http://trac.osgeo.org/mapguide/ticket/1069 to improve the server performance.
>
>
> "I reopen this ticket because I found the revision #4191 can't improve the performance, but decline the server performance.The reason is:
>
> The new server API GetResourceContents() is used to reduce the request between web and server. However in server internal, we shouldn't invoke this API to get resource contents. There are overhead to prepare the layerIds and to get the these contents. You can see ImprovePerformance.patch, in MappingUtil.cpp/LegendUtil.cpp, there are some for statements are introduced. This will decline the performance.
>
> So we should revert the revision #4191."
>
> Please add your comments!
>
> Buddy
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>



-- 
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals


More information about the mapguide-internals mailing list