Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2099 closed defect (fixed)

mg-desktop: Reduce excessive disk IO

Reported by: jng Owned by: jng
Priority: low Milestone: 2.4
Component: Desktop API Version:
Severity: minor Keywords:
Cc: External ID:

Description (last modified by jng)

If you look at any process using mg-desktop in the Task Manager, chances are the "I/O Read Bytes" column will be through the roof.

The explanation is simple, the mg-desktop implementation of MgResourceService is a simple wrapper around the file system, so every GetResourceContent() call (and Maestro does a lot of this) is a call to read a file from disk.

The other explanation can be found by running an mg-desktop application through Process Monitor, which shows the main culprits being:

Part of the solution would be to have an in-memory cache of resource content, such that subsequent calls to GetResourceContent() on the same resource id returns a MgByteReader from a cached copy of the resource content. Subsequently, calls to SetResource() will flush existing entries out and update the cached entry.

We also need to review the use of MgCoordinateSystem* classes in mg-desktop and the ported Log Manager code to see where we're doing things different from MapGuide Server (that does not have these high I/O read numbers)

Change History (3)

comment:1 by jng, 12 years ago

Description: modified (diff)

Implemented an in-memory cache for resource content to avoid disk reads for every GetResourceContent() call. However this does not significantly reduce the I/O read count in the Task Manager.

comment:2 by jng, 12 years ago

Resolution: fixed
Status: newclosed

Hmmm, it seems that the MapGuide Server itself exhibits this same behaviour. Still not sure if we should *really* be concerned about this.

Nevertheless, having an in-memory resource content cache is still useful for us. Closing as fixed.

comment:3 by crispinatime, 12 years ago

The MapGuide behaviour is useful (if not optimal!) as everytime a map is refreshed the current layer definitions are read... editing Library or Session definitions always have an instant effect on the map representation

Note: See TracTickets for help on using tickets.