Starting the deadline submitter script for 3dsMax is for some reason very slow here. Particulary the SubmitMaxToDeadline_Functions.ms. Anything I can look into for what’s causing it to “hang”?
First let me explain some of the internal logic of the SMTD loading process.
- When you launch the SMTD, the UI MacroScript runs through a list of the required script files.
- It then checks to see if a local copy of the script exists from a previous launch.
- If it does exist, it also checks to see if that script was already loaded during the 3ds Max boot process (via an auto-generated startup script that the SMTD launcher creates as needed)
- If the script is locally and has been run already, it does not load it again. In your case, I suspect most of the files were in that category, which explains the extremely short times of a few dozen milliseconds.
- There is an exception to the above rule - some scripts are always re-loaded, even if they have been loaded already at startup or in a previous SMTD launch in the current 3ds Max session. the SubmitMaxToDeadline_Functions.ms file is such a script!
- If the script is found locally but its date or size is different from the one in the Repository, the Repository version of the script is first copied over, then loaded.
- If the script is not found locally, it is also copied over from the Repository, and the local copy is loaded.
The local copies are stored under the Max #userscripts folder:
GetDir #userscripts -->“C:\Users<UserName>\AppData\Local\Autodesk\3dsMax\201X - 64bit\ENU\scripts”
Can you try something?
- Execute the following in the MAXScript Listener:
shellLaunch (getDir #userscripts) ""
- Delete all the script files that start with SubmitMaxToDeadline… in that folder
Then try running SMTD again - the actual local files will be missing and the Repository files will be copied over first.
Post those times so we can compare.
On my machine, the two runs are very similar because my Repository is on the local C: drive (I just use it for testing, not for real network rendering).
Here are my numbers:
Resolving Network Path: 771ms
SMTD_AutoLoadSuccessful = true
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\RegionManipulator.ms"
Loading RegionManipulator.ms: 7ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\TileManipulator.ms"
Loading TileManipulator.ms: 4ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline_Functions.ms"
Loading SubmitMaxToDeadline_Functions.ms: 2765ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline_SanityCheck_Private.ms"
Loading SubmitMaxToDeadline_SanityCheck_Private.ms: 9ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline_SanityCheck_General.ms"
Loading SubmitMaxToDeadline_SanityCheck_General.ms: 5ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline_SanityCheck.ms"
Loading SubmitMaxToDeadline_SanityCheck.ms: 5ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline.ms"
Loading SubmitMaxToDeadline.ms: 6ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline_Defaults.ini"
Loading SubmitMaxToDeadline_Defaults.ini: 6ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline_StickySettings.ini"
Loading SubmitMaxToDeadline_StickySettings.ini: 6ms
Total SMTD Launcher Time: 8258ms
Resolving Network Path: 770ms
SMTD_AutoLoadSuccessful = false
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\RegionManipulator.ms"
Loading RegionManipulator.ms: 87ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\TileManipulator.ms"
Loading TileManipulator.ms: 31ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline_Functions.ms"
Loading SubmitMaxToDeadline_Functions.ms: 2736ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline_SanityCheck_Private.ms"
Loading SubmitMaxToDeadline_SanityCheck_Private.ms: 21ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline_SanityCheck_General.ms"
Loading SubmitMaxToDeadline_SanityCheck_General.ms: 31ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline_SanityCheck.ms"
Loading SubmitMaxToDeadline_SanityCheck.ms: 27ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline.ms"
Loading SubmitMaxToDeadline.ms: 17ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline_Defaults.ini"
Loading SubmitMaxToDeadline_Defaults.ini: 18ms
Running submission script "C:\DeadlineRepository8\submission/3dsmax/Main\SubmitMaxToDeadline_StickySettings.ini"
Loading SubmitMaxToDeadline_StickySettings.ini: 17ms
Total SMTD Launcher Time: 8526ms
As you can see, the times of all scripts get slightly longer in the second run where the local scripts were deleted, but they are still fractions of the second. Only the functions file takes longer, but it is 10x faster than yours.
If your run after deleting the local files increases each file’s time significantly, we will have to look into the cause for that.
If only the Functions file continues to hang for 30 seconds, we will have to add some debug prints to it to understand where it is spending the time…
Hi and thanks for the explanation, Bobo!
So I deleted the files, but it didn’t change the times. I also kept an eye on the #userscripts folder, and the SubmitMaxToDeadline_Functions.ms was copied over the moment the SMTD starting to state Loading SubmitMaxToDeadline_Functions. Tried several times, restarting max etc. Same results.
I am fairly confident in Maxscript so let me know if there’s any debug options or things in the script I can look into.
Yes, the files should be copied immediately after your delete them and start SMTD again.
The copying process of all files should in theory add a few ms to each, but in the end only the Functions took forever to load.
I will prepare a version of the Functions file with some debug prints in it and will upload it here.
Alright, thank you!
Ok, I added debug prints to the most suspicious portion of SMTD Functions - the calls to DeadlineCommand.
I see that the resolving of the Network Path took a second longer than in my case.
So let’s see how much time is spent resolving the various folders (on the average about 1.5 seconds per call on my machine).
To test,
-
Make a backup copy of your Repository\submission\3dsmax\Main\SubmitMaxToDeadline_Functions.ms file. I assume it is the file
“C:\ProgramData\Thinkbox\Deadline8\cache\UMM85BV9iSJSFB3GQoSaEFvOyE\submission/3dsmax/Main\SubmitMaxToDeadline_Functions.ms”
(Btw, can you explain why the deadline stuff is on C: in a cache folder?) -
Replace it with the attached one
-
Restart SMTD (no need to restart Max)
-
Post the MAXScript Listener output.
I will add more debug prints if this does not show us enough…
SubmitMaxToDeadline_Functions_debugprints.zip (95 KB)
I was hoping you could tell me that!
Our repository is on a server. Shared folder, standard setup.
Placing the file in the cache dir didn’t do anything. Looks like it was just overwritten from the repository.
So I placed the file in our network repo and ran it. Here’s the results.
I also ran
and after 30ish seconds got this return
Sorry, I was unaware of the network/local cache setup until our Deadline product manager told me about it
It is new in Deadline 8 and I did not know about this option.
So it looks like resolving the plugins path takes 30 seconds.
This is obviously outside of SMTD’s control, because it is DeadlineCommand that takes this long, and SMTD is just waiting for the result…
I will consult with the actual Deadline developers (I just wrote most of SMTD), and will come back to you.
Alright, thanks Bobo!
I’ll await their answer. At least it is working. It is just slow
Hi guys,
I am also having similar problems, but not on all machines and I thought maybe it is a local network issue. It is also very slow to submit jobs. Did this get resolved?
Deadline 8.0.1.0
Josh.