Possible Memory Leak Inside Maya 2014 While Referencing!?

Hey guys,

So I’ve started digging into a possible memory leak inside Maya 2014 SP3 & SP4. Some of our animators have noticed when referencing our character rigs the
reference time goes from 2 seconds to 5 minutes. My first step was removing the Art Tools Pipeline within Maya to quickly cancel out any possible tool error
or connection issue. Next step was to figure out how to consistently trigger a long wait time reference. Here’s what I’ve figured out.

Quick Reference
Launch a nice clean Maya session
Go to File > Create Reference and reference in your character
The reference finishes in just a few seconds
Click the image below to see Memory usage

Slow Reference
Launch a nice clean Maya session
Open a somewhat large Maya scene (Bigger scenes seem to increase the reference time)
Create a new Maya scene
Go to File > Create Reference and reference in your character
You should now see a pretty big time difference
Click the image below to see Memory usage

Has anyone ran into this issue before?

Thanks!
-Nick

OK. I might be looking at this all wrong. Each time I open an existing Maya scene the memory keeps going up and stays up. This doesn’t seem to
affects performance, but it does affect referencing. Someone must know something! :slight_smile:

-Nick

My studio was having this exact same issue. It is a weird bug somehow connected to the uiConfigurationScriptNode (this saves what windows you had open with your file. ie. hypershade). We were experiencing reference times getting up to as long as 30 minutes. It seems to be made exponentially worse the more dag objects you have in a file.

Turn off these settings:

You will also need to remove the uiConfigurationScriptNode from your maya files. You can just run “delete uiConfigurationScriptNode;” from the maya command line. Save your file, open a new maya, reopen your scene and you should be good to reference. I wrote scripts to remove this from our files and our referencing problems went away.

I have submitted a bug report to Autodesk about this.

we had this problem to, here is a code snippet to clear out the offending nodes.
I don’t think we have this problem in 2015 anymore, I seem to remember seeing a bug fix for this issue in one of the service packs…


hyperViewNodes = cmds.ls(type=['hyperGraphInfo', 'hyperLayout', 'hyperView'])
# remove read-only nodes native to the open file
hyperViewNodes.remove('hyperGraphLayout')
hyperViewNodes.remove('hyperGraphInfo')
cmds.delete(hyperViewNodes)

you’ll have to do this in each file. we found files with hundreds of hyperView nodes in them…

We also had a similar problem as Cnelder. Now I can’t recreate it, but i know my animator had a terrible problem with open already existing referenced animation files.

Same here, also beware of groupID nodes. We had a big layout, referencing tons of assets, and ended up with 950k groupID nodes. Once the referenced files cleaned, our scene size was divided by 10 and performances were (almost) smooth again.

Thanks cnelder! Save/Restore panel layouts was the issue.

We are now running this on startup…

pymel.melGlobals['gUseSaveScenePanelConfig'] = 0
pymel.melGlobals['gUseScenePanelConfig'] = 0

Sorry for the late reply, I ended up thinking this was going to be another dead post. :slight_smile:

-Nick

This might be worth noting for posterity’s sake.

We narrowed this down a little farther to an issue with the Node Editor. Dormant node editors were stored in the scene, these editors were testing each newly created node against their currently shown nodes. This test was so that they [the new nodes] would be added to the view if they had a connection to a node currenly in the node editor.

All node editor panels can be found by running cmds.getPanel(sty=‘nodeEditorPanel’) and adding the suffix “NodeEditorEd” to each one because Maya.

We fixed it by running a function that turns the cmds.nodeEditor “addNewNodes” flag off for every node editor in the scene during a pre-create reference event. You can also change this setting in the UI node editor (it’s a lock icon on the menu bar), but that doesn’t affect any dormant ones (which are saved with the scene).

Maya 2015 fixed the dormant node editor issue (MAYA-25752 in Maya 2015 release notes), but the addNewNodes functionality is still pretty slow in big scenes.