Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
what version of ArcGIS? What kind of DBMS (SQL Server?). Do you mean MXD instead of XMD? –  Kirk Kuykendall Aug 27 '10 at 0:37
    
Kirk: ArcGIS 9.3.1; SQL Server (same behavior in DBF though); and yes, MXD (Updated question) –  BlinkyBill Aug 29 '10 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 Sep 22 '11 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) –  Ragi Yaser Burhum Jan 15 '12 at 17:52
add comment

1 Answer

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

Hope this helps,

CDB

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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