PDA

View Full Version : Small file but long save time!


ThePredator42
07-15-2005, 09:29 AM
Hello,

I have a 75kb file, and it takes AGES to save. I bet this has to do with the 5 reference files in there, alltogether about 170mb in size.

BUT: I use this small file only to put all those references together in one scene, I didnīt do anything else.

So why does it take several minutes to save this? I thought that by referncing my entire scene I would eliminate exactly this problem!

Thank you!

bruegger
07-15-2005, 06:17 PM
It may not be a referencing problem (you're correct in assuming that adding references to a scene should not significantly impact save time).

It may be a lightlinker problem, see this thread:
http://www.cgtalk.com/showthread.php?t=218808

If not: try deleting history. Occasionally a small .mb file with a lot of history can take a while to save (particularly if you're saving over the network).

ThePredator42
07-18-2005, 06:54 AM
(particularly if you're saving over the network).

I do that.. ok Iīll try the history deletion.

here is what maya said after I loaded a reference: I got a message box saying that errors occured and to check the script editor.
And Mr. Script Editor had this for me:
// File read in 6 seconds.

// Warning: Errors have occurred while reading this scene that may result in data loss.

Please check the Script Editor for details. //

Now the particular file in question was only 7mb, so 6 seconds is ok. BUT I was in fact waiting approx. half an hour for the reference to show up.

Iīll have a look at that reference file now...

ThePredator42
07-18-2005, 10:58 AM
that post sounded interesting, I used the code on all my (8) references, and it disconnected the occoassional link, but it ran thru in seconds..

and it still takes so long to save! It LOADS in a zip, though :-/

bruegger
07-18-2005, 01:26 PM
If you're using MB you might want to try saving as MA just to see if it's any better. Usually MB saves/loads faster, but occasionally I've seen the opposite - specifically I had a small MB file which took forever to save over the network, but no time to save as an MA over the network.

ThePredator42
07-19-2005, 11:19 AM
nope, that didnīt help either.

However, having a look at the .ma file gave me a clue - I came across this:

setAttr ".ed" -type "dataReferenceEdits"
MotorRN
MotorRN 9
0 Motor_sc_sysCar MotorRNgroup "-s -nc -r "
0 Motor_sc_sysCar MotorRNgroup "-s -nc -r "
2 Motor_Motor_Getr_L .v " 1"
2 Motor_Motor_Getr_L .do " 7"
2 Motor_Syscar_L .v " 1"
2 Motor_Syscar_L .do " 6"
3 :defaultLightSet.message Motor_lightLinker1.link[1].light ""
3 :defaultLightSet.message Motor_lightLinker1.link[10].light ""
3 :defaultLightSet.message Motor_lightLinker1.link[12505].light ""

the last line caught my interestest, so I took a look at the Motor_lightLinker1 node. Motor is the name of the referenced file, referenced with filename where nodes clash. Now it has many thousand connections to
- initialShadingGroup
- defaultObjectSet
- initialParticleSE

I had a look at your script again when I found this, thinking you you might only sever connections to lightLinker1. But I must admit, now that I paid a closer look to it, I didnīt get your script at all.. I coulndīt find any documentation on hyperGraphLayout. NO idea what you are doing in your first loop :sad:

Iīll try around in the direction of severing all the connections to the light linker, I think the problem is this entire "use sets instead of individual objects when light linking"! business. But that is not what you address in your script, did I get that much right?

ThePredator42
07-19-2005, 11:38 AM
why oh why would my initialShadingGroup connect its
message into around 15k of link[xxxxx].object ?

is there ANY sense behind this?

Isnīt it the purpose of a SET like the initialShadingGroup to exactly AVOID this?

:argh:

ThePredator42
07-19-2005, 11:46 AM
And why do I have more than ONE lightLinker IN THE FIRST PLACE??

Gosh, itīs frustrating - by the time Maya finished processing one of my ideas, I already came across two new ones..
Mayb itīs just time for a coffee....

bruegger
07-19-2005, 01:44 PM
The script I posted isn't that extensive, and was originally written for that one guy's scene. All it does is break all connections from hyperGraphLayout.msg and defaultLightSet.msg. In some cases Maya creates tons of extra (useless) connections that slow down file IO. As you said, it doesn't address anything as complex as the "use sets instead of individual objects when light linking" issue.

The script was not written with referencing in mind. If you were to run it on your scene I would suggest you first run it on each of your references, then open the parent scene, unload all the references, and run it again. If you run it on the parent scene first, and your references have the connection bloat, you may cause a bunch of disconnectAttr edits to be added in the parent scene (the excerpt from your scene indicates this may already be the case).

ThePredator42
07-19-2005, 03:48 PM
I figured out it wasnīt the "light links with sets please" issue. The trouble is, I have 5 [filename]_lightLinker1, all of them extensively connected to initialparticleSE and initialShadingGroup. Not to the default light set. However, I ran your script on the references already, so I guess thatīs the reason for that.

I tried to select all the connections manually and delete them. At least for ONE lightLinker1 node. However, I gave up after half an hour, and killed the task. It would have taken all workday to load all of them into hypershade and detach them.

What is that hypergraphlayout node, you also use for detachment? I can select it, but I donīt get any display of it in the outliner (even w/o dag only) or the hypershade. The help doesnīt even know that node?!

And something else, when - on a testscene - I ran the script, my lighting didnīt work, and even after creating an "illuminates all" light I didnīt get lighting. But I guess I just have to re-link them w/ the light linker?

Edit: the fun is, I am saving another file (an older project I had to lay hands again for a second) just now, and it takes AGES. I just BET it is exactly the same problem. We have to check our production pipeline here to find the moment this problem sneaks into our files.

bruegger
07-19-2005, 05:10 PM
Maya uses the hyperGraphLayout node to store user placement of nodes in the hypergraph. From the docs:
"This node stores Hypergraph layout information for a DAG graph. This includes the position and collapse/expand state of nodes that have been configured by the user and background image information."

I don't know why it would need to a connection to the lightlinker (and perhaps it doesn't).

ThePredator42
07-20-2005, 06:24 AM
your help says that?? I have to have a serious word with mine, then :)

I tried what you said, the "use script on references, then on referencing file" - but I didnīt get as far as the first... it disconnects ONE connection, but my LightLinker still looks like this:


http://www.predators-lair.com/havealook/lightLinker_Node.gif
(sorry I have no clue why it wouldnīt display it when I use insert image)

THOUSANDS of connections. Now I go for it.. oh yeah, 2 days of waiting brought me that far, even donīt have anything to CLEAN UP anymore in my office, you could do SURGERY in here by now... now Iīm going to delete them! Even if it takes this machine a DAY! ...mwwwaaaahhh... gnnnngnnn...
LOL

Thank you, I really appreciate your help here

zylphyr
07-20-2005, 10:44 AM
check this thread:

http://forums.cgsociety.org/showthread.php?t=213671

ThePredator42
07-20-2005, 11:41 AM
it freakin did it!

bruegger, I didnīt only have to disconnect from the defaultLightSet, but also the initialShadingGroup and the initialParticleSE.

Altogether, 180k disconnections!!

The savetime went from 22 min to 1!!!

I ended up with this:

global proc cleanUpLightLinker()
{
string $destinations[] = `connectionInfo -dfs hyperGraphLayout.msg`;
string $dst;

print ("\n\n--------- Cleaning up hyperGraphLayout Connections -----------\n");
for ( $dst in $destinations )
{
disconnectAttr hyperGraphLayout.msg $dst;
}
print ("\n\n--------- Cleaning up initialShadingGroup Connections -----------\n");
$destinations = `connectionInfo -dfs initialShadingGroup.msg`;
for ( $dst in $destinations )
{
disconnectAttr initialShadingGroup.msg $dst;
print("Disconnected initialShadingGroup and " + $dst + "\n");
}
print ("\n\n--------- Cleaning up initialParticleSE Connections -----------\n");
$destinations = `connectionInfo -dfs initialParticleSE.msg`;
for ( $dst in $destinations )
{
disconnectAttr initialParticleSE.msg $dst;
print("Disconnected initialParticleSE and " + $dst + "\n");
}

print ("\n\n--------- Cleaning up defaultLightSet Connections -----------\n");
$destinations = `connectionInfo -dfs defaultLightSet.msg`;
for ( $dst in $destinations )
{
disconnectAttr defaultLightSet.msg $dst;
print("Disconnected defaultLightSet and " + $dst + "\n");
}
print ("\n\n--------- Done -----------\n\n");
};


I used prints so I wouldnīt go mad waiting...


zylphyr, thank you now I even now where it originated from, I found the same bug in several other files!!!

I owe you guys a beer :beer: vbmenu_register("postmenu_1996557", true);

CGTalk Moderation
07-20-2005, 11:41 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.