THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/12/2006 at 22:57, xxxxxxxx wrote:
Cinema 4D Version: 8.2-10.0
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
I know this isn't exactly the place for such a discussion, but I really don't know where else to look. Maybe someone has experience or good links to a better solution.
In my plugin, there are tags that are represented as sliders. They can be connected in master-slave relationships (a master slider value will affect the slider value that is slaved to it, for instance). One possible scenario actually allows a connection like this: A->B->A->B.... Currently, I am unsetting a flag on all of the sliders before computations and setting the flag as they are computed (mark and clear) to avoid the infinite loop that would occur otherwise. Gosh, is this slow. A comparison of a safe situation with and without this setting/unsetting shows that 'with' impacts the speed by 25% (!!!!!).
Since I'm currently optimizing to increase performance, this situation is directly under my target for finding a better approach. The problem is that I cannot find a better stopping method. Since the master and slave are juxtaposing (depending upon the user interaction) and the computation has to occur at least once from one to the other (starting at either, remember), it is hard to determine the best path here. Also remember that I cannot guarantee simple direct loops (A<->B). This could also be hidden looping (A->B->C->D->A).
One solution mentioned in a PDF is a form of duplication (the recursive nodes are duplicated so that the result is always a tree structure - but no real explanation beyond that).
Any pointers appreciated!