Implement recommended thread access to prevent error spam on startup#12
Implement recommended thread access to prevent error spam on startup#12isirode wants to merge 1 commit intogodot-extended-libraries:masterfrom
Conversation
There was a problem hiding this comment.
This change effectively makes the setup process blocking again, which means project startup is noticeably slowed down (by roughly 1 second every time you start the project).
This needs to be fixed before this PR can be merged, as this add-on shouldn't affect startup times.
|
I do not notice it, but I have a pretty good CPU, so it might be why. Do you know if it is the get_viewport() or the get_viewport_rid() method which is slowing done the startup ? |
|
Can you indicate me why your fix was not complete also ? It did not produce any warnings on my side when I tested it. |
The slowdown is mostly in |
|
Oh, I see, it was previously called inside the thread, but now, it runs inside the main thread. I did not think of it, since it seemed normal to do graphic operations on the main thread. |
Hi,
The PR as requested.
I removed the thread safety check, since it does not seem necessary anymore.
I tested it on 4.1 official [970459615] (downloaded recently), on a game with multiple scenes, the errors are not present.
Have a good day,