Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#500 closed enhancement (fixed)

Schema Cache performance enhancements

Reported by: brentrobinson Owned by: brucedechant
Priority: medium Milestone: 2.1
Component: Feature Service Version:
Severity: major Keywords: Performance Studio Viewer
Cc: External ID:

Description

This change will provide 2 enhancements to the caching of schema information:

1) Avoid per-class XML serializations in FeatureService.DescribeSchemaAsXml. This will make opening a layer in Studio faster when the layer feature source has many classes.

2) Cache the FDO Feature Schemas, eliminating the need to fetch them from the FDO provider each time FeatureService.GetClassIdentityProperties is called. The fetch from provider causes the schemas to be cloned. This speeds up the map viewer startup when the map has many layers from the same feature source.

Change History (5)

comment:1 by brentrobinson, 16 years ago

Resolution: fixed
Status: newclosed

The DescribeSchemaAsXml changes make the following time difference for the scenario:

  • Create a feature source on an Oracle datastore with 400 tables and about 6000 columns
  • Create a layer that references this feature source.
  • Execute the following on the Oracle instance:

alter system flush buffer_cache

  • restart MG server
  • Go into Studio and open the layer.

The following shows the times (in seconds) from when the layer open is started until the layer's dropdowns are populated (before and after the fix):

Before After

Total 25 14 FeatureService.DescribeSchemaAsXml part 16 7

For the GetClassIdentityProperties changes, the scenario checked was:

  • Create a feature source on an Oracle datastore with 1500 tables and 500 views
  • Create 50 layers each for a different class from the above feature source
  • Create a map definition that includes all 50 layers
  • create a web layout on the map definition
  • Execute the following on the Oracle instance:

alter system flush buffer_cache

  • restart MG server
  • Open the web layout on the DWF viewer
  • do a second run, opening the web layout.

The time from when the login prompt was exited, until the legend showed up was taken. The following shows the times in seconds:

Before After

Run1 17 12 Run2 11 2

Timings were done with Studio and MG Server on a Windows XP machine ( 2.66 GHz, 2 CPU, 3Gb RAM), accessing Oracle over a LAN. Timings may vary in other environments.

Revision: 3090 Author: brucedechant Date: 5:58:47 PM, Thursday, March 13, 2008 Message: Fix for trac ticket 500 - Schema Cache performance enhancements http://trac.osgeo.org/mapguide/ticket/500

  • Submitted on behalf of Brent Robinson

Modified : /trunk/MgDev/Server/src/Common/Cache/FeatureServiceCache.cpp Modified : /trunk/MgDev/Server/src/Common/Cache/FeatureServiceCache.h Modified : /trunk/MgDev/Server/src/Common/Cache/FeatureServiceCacheEntry.cpp Modified : /trunk/MgDev/Server/src/Common/Cache/FeatureServiceCacheEntry.h Modified : /trunk/MgDev/Server/src/Common/Cache/Makefile.am Modified : /trunk/MgDev/Server/src/Common/Cache/ServerCache.vcproj Modified : /trunk/MgDev/Server/src/Services/Feature/ServerDescribeSchema.cpp

comment:2 by brentrobinson, 16 years ago

Milestone: 2.1

comment:3 by brentrobinson, 16 years ago

Forgot to format tables in previous comment. Here they are again:

DescribeSchemaAsXml changes:

							Before		After

	Total						25		14
	FeatureService.DescribeSchemaAsXml part		16		 7

GetClassIdentityProperties changes:

			Before		After

	Run1		17		12
	Run2		11		 2

comment:4 by zspitzer, 16 years ago

Which Oracle FDO provider are you using for your timings?

comment:5 by brentrobinson, 16 years ago

I used the Autodesk Oracle provider, which was probably not the right choice for putting together stats for an Open Source ticket. However, the fixes will still have an effect when using OS providers. The percentage improvement will vary between provider, depending on how fast it can do an FdoIDescribeSchema.

Note: See TracTickets for help on using tickets.