Page 1 of 1

Start-up time Nuke via CGRU vs without CGRU

Posted: Wed Nov 09, 2022 10:18 am
by andrep
Hi,

We are noticing a slow down in starting Nuke when we run it through CGRU versus starting Nuke from its regular path.
It usually takes 10 seconds or more extra when we run Nuke via the start_nuke script in the cgru folder.
When we run both from a command line with -V (verbose) mode on Nuke, the console stays silent for those 10 seconds before starting Nuke.
So, we are wondering what is actually going on during this time? Is CGRU first running additional scripts in the background or is there another explanation?

Re: Start-up time Nuke via CGRU vs without CGRU

Posted: Wed Nov 09, 2022 2:46 pm
by timurhai
Hi!

That script initializes some environment needed for CGRU.
Find the latest Nuke installation.
Adds cgru/plugins/nuke to NUKE_PATH to make Nuke to run init.py in there.

It can take some time, but 10 seconds is a very huge period.
It should be less than a second and not should not be noticable.
I faced such situatans addind some add-ons from network location with a slow network connection.

You can add echo and print() to shell and python scripts to find out what takes much time.
These files will be sourced:
https://github.com/CGRU/cgru/blob/maste ... rt_nuke.sh
https://github.com/CGRU/cgru/blob/maste ... rt__all.sh
https://github.com/CGRU/cgru/blob/maste ... up_nuke.sh
https://github.com/CGRU/cgru/blob/maste ... ke/init.py
And some others. You can find out all the route reading this scripts.

Re: Start-up time Nuke via CGRU vs without CGRU

Posted: Wed Nov 09, 2022 2:57 pm
by andrep
Thanks Timur,

I will have a look into these scripts.
We do load additional plugins from our server on the local network, but these also load without CGRU, so that shouldn't matter.
The loading time does vary from time to time, taking up a minute or even more sometimes.
Although, I suspect that is because Windows sometimes has part of the software / variables still loaded into memory and other times it has to load every bit again.