Recently I came into a performance issue with a C# plugin I am writing for AutoCAD. Typically one would track down these issues with a profiler, but because I'm Visual studio Express 2012 (for current CAD templates) I could not get any profiler to recognize my environment.
So, as a poor mans profiler I would simply run the code and pause it every few seconds in Visual Studios to see what portion of the code is being ran multiple times, or where the code is hanging. After tracking it back to what was actually calling the sub it typically paused i was able to use a cached copy of the data and cut operation time from around a minute to under 5 seconds.
Does any one else have a similar trick that may be useful to others new to development?
So, as a poor mans profiler I would simply run the code and pause it every few seconds in Visual Studios to see what portion of the code is being ran multiple times, or where the code is hanging. After tracking it back to what was actually calling the sub it typically paused i was able to use a cached copy of the data and cut operation time from around a minute to under 5 seconds.
Does any one else have a similar trick that may be useful to others new to development?
Comment