Notifications
Clear all

[Closed] Any way to speed up getMAXFileObjectNames?

I’m writing a project management tool and at present I’m listing the project scenes along with their object count (which will later expand into the objects themselves if necessary). unfortunately the read of the files is taking an extraordinarily long time.

Is there a way to speed up this read (with or without getMAXFileObjectNames), or is it just a case of “Lots of files with lots of objects = Lots of time”?

3 Replies

Yeah it takes a while. I was joking today in the office that I could write a bandwidth speedometer for our network based on how long my script took to load the first variable (a getmaxfileobjectnames).

As far as I can tell it’s the fastest way to get what you want. Luckily in my case I can carefully limit when it’s executed and hold it in a struct.

If your just dealing with summary info, consider a PreSave callbacks and stash the info somewhere on the server or SQL DB. We’ve a selectionset based work flow and our managment exports the SelSet’s with each save, slows down the save on really big files, but allows clean dynamic scene construction from anywhere.

A quick callback to list a summary of info could be very quick.

#(objects.count, lights.count, cameras.count… ect ) maybe even list the group heads if you’ve solid naming conventions, that would give a good idea of what is in the file… provided you group stuff anyway…

HeadNames = for SelHelp in Helpers where isGrouphead SelHelp collect SelHelp

Then if the user decides they need to see the whole tree, have them wait…

Great ideas; we were actually discussing this option today as my present management scripts export a data file with each backup with this very info.

I like!