3

I have an ArcEngine application, based off an MXD with an axMapControl. Several of the layers in the map are event layers built with XY data in a SQL table. It has routing info applied from a routing table too.

My problem is that when I pan the map, the memory usage grows and grows. The same behavior is exhibited in ArcMap. This inevitably leads the target computer to run at a crawl as memory is depleted, and hard disk swapping all the time.

I'm assuming that the map control is caching the spatial side as new data is drawn on the map.

Is there any way to manage this memory usage? Perhaps flush from time to time, or disable all together? At this stage slower drawing would be preferable as it's simply unworkable in this scenario.

UPDATE: Further investigation suggests that this is always the case, though on low spec (CPU) computers, when panning a lot, the CPU simply can't manage/flush the cache as fast as it grows. On faster machines, you can see the memory climb, but it returns to a lower level pretty quickly too. So this one's simply chalked up to slow CPU's not being able to keep up with all the map control cleverness. It would still be see a good explanation of how this all works behind the scenes.

4
  • what version of ArcGIS? What kind of DBMS (SQL Server?). Do you mean MXD instead of XMD? Commented Aug 27, 2010 at 0:37
  • Kirk: ArcGIS 9.3.1; SQL Server (same behavior in DBF though); and yes, MXD (Updated question)
    – BlinkyBill
    Commented Aug 29, 2010 at 23:48
  • In ArcMap have you run the Analyze Map Tool from the Map Service Publishing Toolbar to check any potential performance issues? Have you thought about creating the Event Layer as an FC as a test?
    – CDBrown
    Commented Sep 22, 2011 at 1:00
  • Can you post a small chunk of code/pseudo code of how you structured your arcengine app? In particular, code you execute often (like panning) Commented Jan 15, 2012 at 17:52

1 Answer 1

1

Here I am assuming that the table you are connecting to is part of a Spatial database Connection.

Check to make sure that you have built an Multi Field Attribute Index for the X and Y fields as this will mean that your Desktop client can search those unique values quicker. If it is a simple ODBC Connection you can do the same in SQL Server Management Studio.

This should then allow you to get a quicker result on the Event Layer, but I still believe that a Feature Class would be a better option as far as speed. This Feature Class can easily be in SQL Server Spatial Data Type which would allow you to still handle the table in other environments, provided you have ArcGIS Desktop 10, or are willing to register the table with ArcSDE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.