PDA

View Full Version : Saving on a server takes forever


slincoln
03-13-2006, 09:11 AM
Hi.

Saving locally just takes a few seconds. But when I have a big scene (>5MB) and save the file on our company server it can take several minutes. And it's not that our company file-server is otherwise slow. Copying files to or from it lightning fast.

Has anyone written a script that replaces the save or incremental save command so that it exchanges the filepath from $wherever to locally on the harddrive and then copies that file to $wherever?

I'm pretty sure that there are people out there with bigger scenes than me and that they are working with other people and has to save on a server. Are there other solutions to this problem?

tciny
03-13-2006, 10:37 AM
Shouldnt be hard to do:

proc saveViaCopyAs( string $filename, string $fileType )
{
file -rename "C:\\temp\\tempSave.mb";
file -save -type "mayaBinary";
sysFile -move $filename "C:\\temp\\tempSave.mb";
}

// Save with saveAs dialog
fileBrowserDialog -m 1 -fc "saveViaCopyAs" -ft "mayaBinary" -an "SaveAs" -om "SaveAs";

slincoln
03-13-2006, 11:28 AM
Thanks tciny

I tried pasting it into the script editor and running it, but I get an error, and I can't figure out how to solve it. (I'm not really an expert mel-programmer so it could be something really stupid.) Have your tried running this on your computer?

This is the echo I get from the script editor when set to Echo all commands.

// Save with saveAs dialog
fileBrowserDialog -m 1 -fc "saveViaCopyAs" -ft "mayaBinary" -an "SaveAs" -om "SaveAs";
getAttr defaultRenderGlobals.outf;
// Result: 3 //
saveViaCopyAs "K:/Serverfiles/Secretclient/Maya/scenes/heavycadfile.mb" "mayaBinary";
fileCmdCallback;
about -application;
// Result: maya //
about -product;
// Result: Maya Unlimited 5.0 //

... And then it goes on and saves all the positions and attributes of various windows too numerous to put into this forum...

timeControl -q -ds $gPlayBackSlider;
// Result: 0 //
// Error: Can't write to "C:\temp\tempSave.mb" //
// Error: Could not save file. //
// Result: 1 //


I'm running on Windows 2k and Maya 5.0.

slincoln
03-13-2006, 12:06 PM
I solved it.

Instead of using double backslashes I used slashes in the filename. It may be some operative system thing. I donno. But now it works. Thanx a million tciny, you have cut my save time from several minutes down to two seconds.


proc saveViaCopyAs( string $filename, string $fileType )
{
file -rename "C:/temp/tempSave.mb";
file -save -type "mayaBinary";
sysFile -move $filename "C:/temp/tempSave.mb";
file -rename $filename;
}
// Save with saveAs dialog
fileBrowserDialog -m 1 -fc "saveViaCopyAs" -ft "mayaBinary" -an "SaveAs" -om "SaveAs";

tciny
03-13-2006, 02:31 PM
Glad it worked out for you. Strange thing tho about the escaped backslashes... but good to know.

TheNeverman
03-17-2006, 09:00 PM
The performance issues your experiencing could be due to several different things: server load, network load/collisions, data encryption, etc...

Has your network admin looked into the issue?

slincoln
03-18-2006, 05:45 AM
It' s the wierdest thing. If I just press save and wait, saving this particular file takes at least five minutes. But if I press save and then open the Explorer and go to the folder where Maya is saving and press F5 repeatedly to refresh the window, the saving speeds up so that it only takes 30 seconds. I have timed it with a stopwatch several times.


My network admin has been informed and he just laughs and thinks its crazy, which it is.

rocknzoom
03-18-2006, 06:33 AM
the script which is there here... i tried... but i dint get the idea wht is a difference in this script... if u do it normal my going to file and save as...
i m just new in this MEL... first of all i dint get the script which is there here... but still i want to know.. will u tell me how it work and wht is a use of it...

JamesPiechota
03-18-2006, 11:32 PM
There used to be a bug in Maya where saving Binary files over the network would take (much) longer than saving the equivalent Ascii file. I believe this was fixed in either 6.0.1 or 6.5 - what version are you using?

If you're hitting that bug, an alternative is to save as Ascii.

rocknzoom
03-20-2006, 04:30 AM
There used to be a bug in Maya where saving Binary files over the network would take (much) longer than saving the equivalent Ascii file. I believe this was fixed in either 6.0.1 or 6.5 - what version are you using?

If you're hitting that bug, an alternative is to save as Ascii.


thanks for answerin... i kno binary file.. its a normal file... but wht is Ascii file...i have seen ascii types files... but i dont kno wht is it.. till last month i was workin in 6.0 this month onwards we started maya 7.0...
u mean to say if i copy this script saving and copy will b faster in networks...
its only work for network or it will b faster in single comp also..

slincoln
03-20-2006, 07:41 AM
I'm still running Maya 5.0, because buying new software is expensive and I can't persuade my company that the investment in Maya 7.0 would result in faster production for what I do.

rocknzoom
If you're experiencing 5 minute saving times, this is worth looking into for you. Otherwize, just leave it. If you want to try it out you can just copy the script from this webpage and paste it into your script editor. Press ctrl and ENTER to run the script. But I can't give you any guarantee that it will work in Maya 7.0

rocknzoom
03-20-2006, 08:13 AM
I'm still running Maya 5.0, because buying new software is expensive and I can't persuade my company that the investment in Maya 7.0 would result in faster production for what I do.

rocknzoom
If you're experiencing 5 minute saving times, this is worth looking into for you. Otherwize, just leave it. If you want to try it out you can just copy the script from this webpage and paste it into your script editor. Press ctrl and ENTER to run the script. But I can't give you any guarantee that it will work in Maya 7.0


thank u... i tried and i got the result also.. i was just confuse.. y to use it... and i understood to work it faster... but can u tell me abt Ascii files...

JamesPiechota
03-20-2006, 09:23 AM
When you save or export a file you have the option of saving it as Maya ASCII (.ma) or Maya Binary (.mb). An ASCII file is basically a MEL script - it records the data in your scene using MEL commands (although there are rules about which MEL commands can be used in a .ma file, as well as the order in which they occur). As a result you can open a .ma file in a text editor and make changes if you need to. The downside is it can be much larger than a .mb file and, under normal circumstances, may take longer to load/save.

rocknzoom
03-21-2006, 11:31 AM
Thank you JamesPiechota.. thank u for the information..

CGTalk Moderation
03-21-2006, 11:31 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.