Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inefficient macros?



i've noticed an unexpected behavior in quartz composer - tell me if i'm imagining things:


when i connect two patch networks to a multiplexer - and then feed that into a billboard - composer "knows" to only evaluate only the one network which contributes to the final result.


but if i put that multiplexer into a macro (simply by publishing all it's inputs and outputs) then composer does NOT "know" to only evaluate one network. it evaluates both.

Good catch! There's actually a performance issue. Looking at the engine implementation, it's simply because when the macro patch is executed, all its inputs are evaluated first, and then the macro patch inside is executed. The macro patch does not know some of its inputs actually come from a multiplexer and it's not necessary to execute them all.


________________________________________________________
Pierre-Olivier Latour                            email@hidden
Quartz Composer Architect                Graphics & Imaging Team

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden
References: 
 >inefficient macros? (From: Karl Stiefvater <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.