open dspx with layer label is slow

Oct 21, 2012 at 11:51 AM
Edited Nov 5, 2012 at 2:00 PM

I added shp layer and set labels for that layer and saved as dspx file with your latest DemoMap from DotSpatial ver 1.3. When reopening it takes this dspx file about 10 secs to open. After that when I try to add new layer the program stops working. 

This also happens with MW6, only MW4 works OK!

Regards, vzavec

>>> 22.20.

The problem arrise when dspx file is in different folder as shp files!  But reopening the created dspx file with shp file cca 1MB with one label setup it takes 20 secs !!!! This is too much. And all other manipulations with program takes too much time. If now I try to open small 50kb shp it takes 25 secs!

>>> 20.10.

The exact file path for my shp file is 'C:\Mapgis\SHP\CEV_PLIN.dbf'  but as I can see from the message report bellow report shows 'C:\Mapgis\SHP\SHP\CEV_PLIN.dbf'   >>> there must be only one  C:\Mapgis\SHP not doubled 'C:\Mapgis\SHP\SHP\  !!!???

What is happened here! Is there any help on this?

 

>> 5.11.   still need help on this ! 


Please see the bellow information about what happens:

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Mapgis\SHP\SHP\CEV_PLIN.dbf'.   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)   at DotSpatial.Data.AttributeTable.SupplyPageOfData(Int32 lowerPageBoundary, Int32 rowsPerPage)   at DotSpatial.Data.LineShapefile.GetFeature(Int32 index)   at DotSpatial.Controls.MapLabelLayer.DrawFeatures(MapArgs e, IEnumerable`1 features)   at DotSpatial.Controls.MapLabelLayer.DrawFeatures(MapArgs args, List`1 features, List`1 clipRectangles, Boolean useChunks)   at DotSpatial.Controls.MapLabelLayer.DrawRegions(MapArgs args, List`1 regions)   at DotSpatial.Controls.MapFrame.InitializeLabels(List`1 regions, MapArgs args, IRenderable layer)   at DotSpatial.Controls.MapFrame.Initialize(List`1 regions)   at DotSpatial.Controls.MapFrame.Initialize()   at DotSpatial.Controls.MapFrame.LayerCollection_MembersChanged(Object sender, EventArgs e)   at System.EventHandler.Invoke(Object sender, EventArgs e)   at DotSpatial.Data.ChangeEventList`1.OnListChanged()   at DotSpatial.Symbology.LayerEventList`1.OnListChanged()   at DotSpatial.Data.ChangeEventList`1.OnInclude(T item)   at DotSpatial.Symbology.LayerEventList`1.OnInclude(T item)   at DotSpatial.Symbology.LayerCollection.OnInclude(ILayer item)   at DotSpatial.Serialization.BaseCollection`1.Include(T item)   at DotSpatial.Serialization.BaseCollection`1.Add(T item)   at DotSpatial.Controls.MapLayerCollection.Add(IFeatureSet featureSet)   at DotSpatial.Controls.Map.AddLayers()   at DotSpatial.Plugins.MenuBar.MenuBarPlugin.AddLayer_Click(Object sender, EventArgs e)   at DotSpatial.Controls.Header.SimpleActionItem.OnClick(EventArgs ea)   at DotSpatial.Controls.Header.MenuBarHeaderControl.<>c__DisplayClass2.<Add>b__1(Object sender, EventArgs e)   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)   at System.Windows.Forms.ToolStrip.WndProc(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)