Some code runs really slow in debug mode
SBRK opened this issue · 2 comments
Is it expected behaviour that some code of a script I run runs extremely slow in debug (5 minutes vs 6 seconds)? The code in question iterates on the pixels of a textures.
It's kind of a bother when iterating and debugging code that happens after that particular step.
Sorry, not sure why that is. All this addon does is easily allow using the ptvsd package, a debugger, from within Blender. It might be ptvsd or it might be Blender causing the problem. I've been told it might be possible to swap out ptvsd for debugpy which given it's a different debugger might as a side effect work better? but I don't know, and I haven't had time to look into it.
I would suggest you try building Blender yourself (it is not as hard as it used to be) and debugging your addon that way. I've never tried debugging an addon that way, so I'm not 100% sure how, but I would try just adding your addon beside the included ones (like the one in the example) and see if that works. If that doesn't I'm sure the devtalk forum can help with how to do it properly.
I will be closing this since it does not seem like it was an issue with the addon. Feel free to re-open if it was.