Hi, folks. I'm trying to create a model in the DE domain with thousands of actors. I'm creating the model, and running it, by writing Java code; I'm not doing anything graphical at all. All the actors are instances of the same Java class that extends DEActor. Each actor has one input and one output, each with about four channels connecting to other actors (except for a few actors at the "beginning edge" and "ending edge" of the graph, which have no input channels and no output channels,
respectively).

What confuses me and alarms me is that, while the code (step 1) to instantiate the actors and the code (step 3) to run the model executes in a reasonable amount of time, the code (step 2) to wire together all the actors' inputs and outputs takes an amazing amount of time! I'm trying my program with a steadily larger and larger number of actors, and doubling the number of actors causes the time for Step 2 to multiply 8 times! For example, with 1,000 actors, it took 186 milliseconds to instantiate them, 9 minutes and 35 seconds to wire them, and 2 minutes to run
the simulation.

 I've stepped through my own code, and the Ptolemy code, trying to find
which code might be taking a long time during link-wiring, and
I've gotten some glimpses.  For one thing, every
time you add one new link to a model, Ptolemy does a lot of rechecking of
the graph topology and model integrity--that makes me wish there were a
version of method CompositeEntity.connect( ComponentPort, ComponentPort )
that would take a bunch of links, add them all in, <I>then</i> check model
integrity. Also, it looks to me like some of the checking may be related to checking the model's safety for modification while it's running. I don't want to modify it while it's running; is there a way for me to configure something to signify that,
so that Ptolemy won't check the model so thoroughly?

 About the only other glimpse I've gotten is that method
DEDirector._computePortDepth() seems to take up a lot of time.

 Of course I will appreciate any information or advice you can give me
and how to make linking take less time.

    Respectfully,

    Richard Ware


----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to