[mapguide-trac] #1914: ResourceExists in MaestroAPI takes 1 second to execute with LocalNative-Connection

MapGuide Open Source trac_mapguide at osgeo.org
Fri Jan 13 11:50:22 EST 2012


#1914: ResourceExists in MaestroAPI takes 1 second to execute with LocalNative-
Connection
------------------------+---------------------------------------------------
   Reporter:  gBecker   |       Owner:  jng        
       Type:  defect    |      Status:  new        
   Priority:  high      |   Milestone:  Maestro-4.1
  Component:  Maestro   |     Version:  2.2.0      
   Severity:  critical  |    Keywords:             
External_id:            |  
------------------------+---------------------------------------------------

Comment(by jng):

 The problem is that the local native implementation of ResourceExists()
 does a version check (against the SiteVersion property) to determine if
 the underlying MgResourceService.ResourceExists() is safe to call

 SiteVersion is lazy loaded and it is this initial load that takes one
 second to complete. The property also only lives for the duration of the
 connection, which would probably explain why it takes 1s on every request
 as it is a different connection instance each time.

 Since for local native connections, the site version is well-known because
 we're referencing against the official API, which exists in a known set of
 releases, we can just hard-code the return value, instead of interrogating
 MgServerAdmin for the actual version number. This will eliminate the 1s
 delay for ResourceExists() and any other API that needs to do version
 checks.

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1914#comment:1>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list