Optimizing Load Time

scalf's picture

I ran into an interesting situation recently involving the arrangement of patches affecting the load time of a composition.

I am writing a comp that lets a 4x4 array of buttons control a 4x4 array of sprites. The core of the patch adds different boolean values together and is then combined into a structure heading to the sprites.

It works no problem, except when I started over and loaded the comp it took on average 45 seconds to load. What? It ran just fine and was smooth prior. Although the layout is a massive amount of math patches I felt that there should not be a reason it takes so long to load. Of course once it does load it runs just fine. Also, entire program is only 2.9mb

Is it because Quartz compiles the composition before each load?

I then decided to play around and found that the more nested the functions were the faster it loaded. I started by taking chunks and making them macro patches - below you can find an image illustrating this. And by combine I mean the code stayed the same it was only how it was arranged that differed.

Is this per usual?

I had no idea that the nesting of patches had anything to do with loading a comp. In fact I thought that it would make it faster if all macros were exploded.

Can anyone shed light on this or point towards a resource that covers this?

Any insight appreciated.

Settings Dialog with save and load params functionality (Composition by jrs)

Author: jrs
License: Creative Commons Attribution-NonCommercial
Date: 2013.02.21
Compatibility: 10.6, 10.7, 10.8
Required plugins:
Kineme File Tools, Kineme DataTools (to be released), Kineme Spooky Oatches, Noise Industries QC Plugins

A settings dialog that allows you to control parameters via keys, mouse and nudge buttons as well as control the min/max values and the scale of movement when using the keys. It also save and loads the parameters via the kineme structure to file patch.

Quartz crash corrupts related compositions

scalf's picture

I have this problem with a file, more than once.

I am making a Vj mixing program by the name of Senses. It loads files from a directory, applies effects, then outputs etc.

I have this problem. I get it working and then I save, quit, come back to it in a few minutes and Quartz crashes loading it. It will open a blank composition, create and save a new one no problem. But, if I load the last save of Senses, or any previous rendition (v 1.0, 2.0, 2.2, etc) it will crash. Interestingly enough, I loaded this on a 2nd machine which is also running 32-bit QC 4.0 with 10.6.8 and a mirror of the plugins it loaded but with the below error report. It changed some of the routing of patches to get it to run when I hit okay after seeing the report.

I read the crash report and I get the report below.

I tried clearing the p.list, but that changed nothing. I tried uninstalling through the terminal, then reinstalling Quartz and no changes in condition. Removing certain plugins. The first time this occurred I tried scrubbing and reinstalling everything and that was the only time I was able to reload the last saved version with no grief (composition saved onto zip drive). But now, after three days since reinstalling and much work done I have encountered this problem again. I am sure one can imagine that this is unfortunate, and adds some insecurity to using Quartz Composer not knowing the cause just yet. But I know this is fixable and must be preventable.

I have come up with a few ideas

  • There is some runtime or path configuration that is causing the knot. Why it came up now I don't know. Perhaps if we could isolate and delete it would fix the flow.
  • I have loaded the comp on a 2nd computer, deleting selected portions and running it on the 1st machine. Some load and some don't. Through isolating the bad patches I have found that certain sections of code are faulty. When the "RGB_On" or "Vj Module" were deleted the comps would run once again. However it is a vast chunk of the patch work and not just a line or two; seemingly.
  • Is there a way to investigate further through a different log or crash report
  • Could it have gotten hung up reading a file and gotten "stuck"?

Has anyone experienced anything like this? What I don't understand is how previous versions of the file would not work after a crash that happened many saves and version later? It even happens to versions of Senses loaded from quarantined computers as well.

I aim for this project to be running smooth and open one day. I would really appreciate if anyone might be able to load this up and see if there were any apparent problems in the coding that kept it from running.

Any feedback would be much appreciated,


Channel 1 Cannot create connection from ["Image_Out" @ "Patch_6"] to ["Channel_1_Global" @ "Patch_2"]

Channel 1 Cannot create connection from ["RGB_On" @ "Patch_6"] to ["For_RGB_Glitch" @ "Patch_13"]

Channel 1 Cannot create connection from ["RGB_Count" @ "Patch_6"] to ["RGB_Count" @ "Patch_13"]

Channel 1 Cannot create connection from ["Image_Out" @ "Patch_6"] to ["inputImage" @ "Sprite_1"]

Channel 1 Cannot create connection from ["RGB_Time_Memory_Dump" @ "Patch_6"] to ["inputRZ" @ "Sprite_3"]

Channel 1 State restoration failed on node "RenderInImage_1"

Vj Module State restoration failed on node "Patch_1"

Senses Render State restoration failed on node "Patch_1"

Senses State restoration failed on node "RenderInImage_1"

Macro Patch State restoration failed on node "Patch_1"

(null) State restoration failed on