# DC Redraw with C Extension

**URL:** <https://forums.sketchup.com/t/dc-redraw-with-c-extension/397>\
**Category:** Developers\
**Created:** [August 21, 2014, 7:10pm UTC](https://forums.sketchup.com/t/dc-redraw-with-c-extension/397 "2014-08-21T19:10:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olivier](https://avatars.discourse-cdn.com/v4/letter/o/d2c977/32.png) [@Olivier](https://forums.sketchup.com/u/Olivier)\
**Post date:** [August 21, 2014, 7:10pm UTC](https://forums.sketchup.com/t/dc-redraw-with-c-extension/397/1 "2014-08-21T19:10:16Z")

</div>

Hi there,

It seems that combining DC redraw (`$dc_observers.get_latest_class.redraw_with_undo`) with C Extension takes a long time to complete while in Debug mode within VS2012. Am I doing something wrong? Is there a way to avoid such behaviour ?

Thanks,

Olivier

P.S.: I always got the SketchUp popup “This operation seems to be taking a long time. Would you like to continue?”

---

<div class="post-metadata">

**Author:** ![tt\_su](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/tt_su/32/17_2.png) [@tt\_su](https://forums.sketchup.com/u/tt_su)\
**Post date:** [August 21, 2014, 8:46pm UTC](https://forums.sketchup.com/t/dc-redraw-with-c-extension/397/2 "2014-08-21T20:46:46Z")

</div>

Does it always happen only in Debug mode? Do you have a reproducible sample?

Debug mode do tend to be slower though - but you are running your C extension in a debug build - not SketchUp itself. But maybe you have symbols loading from the MS symbol server?

---

<div class="post-metadata">

**Author:** ![Olivier](https://avatars.discourse-cdn.com/v4/letter/o/d2c977/32.png) [@Olivier](https://forums.sketchup.com/u/Olivier)\
**Post date:** [August 21, 2014, 10:59pm UTC](https://forums.sketchup.com/t/dc-redraw-with-c-extension/397/3 "2014-08-21T22:59:22Z")

</div>

This happens when the C extension process is attached to SketchUp.exe with all breakpoints and step features.

---

<div class="post-metadata">

**Author:** ![tt\_su](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/tt_su/32/17_2.png) [@tt\_su](https://forums.sketchup.com/u/tt_su)\
**Post date:** [August 22, 2014, 7:15am UTC](https://forums.sketchup.com/t/dc-redraw-with-c-extension/397/4 "2014-08-22T07:15:57Z")

</div>

And the C extensions is calling `$dc_observers.get_latest_class.redraw_with_undo` ?  
What else is it doing? Hard without more context.

---

<div class="post-metadata">

**Author:** ![Olivier](https://avatars.discourse-cdn.com/v4/letter/o/d2c977/32.png) [@Olivier](https://forums.sketchup.com/u/Olivier)\
**Post date:** [September 3, 2014, 6:42pm UTC](https://forums.sketchup.com/t/dc-redraw-with-c-extension/397/5 "2014-09-03T18:42:57Z")

</div>

Thanks pointing me to the right direction, yes, it was about symbols. This [forum](http://stackoverflow.com/questions/12567984/visual-studio-debugging-loading-very-slow) gave me the steps to regain a normal speed in Debug mode. I wonder why it was only slow while redrawing DC ?

By the way, `$dc_observers.get_latest_class.redraw_with_undo` was called from Ruby.

Cheers
