First debug() is quite heavy

Hi,
I have noticed that when calling debug() for the first time, it causes several frame drops. It is easy to replicate, just open a fresh scene and executing debug('hello') from textport.

This seems to be much better in latest experimental version - trimming the frame drops down to a minimum. After that debug() works without any problem. I am not sure if it is expected or not, but I thought I might mention it just in case it shouldn’t be happening. I guess some heavier import is being run on first debug() - therefore it is much faster in latest experimental (due to new python there)? Anyway, it isn’t a big deal, just something I have noticed. :slight_smile:

I couldn’t replicate this. What build?

Hmm, I have tested this with latest stable (2022.33910) and new experimental build. (Using Windows 11.)

If you have a specific test you’re using, maybe send your network?

I am attaching a simple example, however if you weren’t getting drop frames from textport, I guess this won’t make much difference. Here is also video showing drop frames on my side (just get rid of the crash extension). The first run of text1 takes 156ms on my system.

debug.1.toe (3.7 KB)
2023-09-27 11-52-09.mkv.crash (665.2 KB)

If you have some idea on what should I do next in order to help you with this, feel free to let me know! :slight_smile:

I was looking at this again and it doesn’t drop frames in latest for me. If you have a minute, see if there is any improvement on your end?

Hi Ivan, yeah you are right, no drop frames in latest build :slight_smile: