Ignore:
Timestamp:
Aug 27, 2010, 8:46:15 PM (11 years ago)
Author:
kopal
Message:
  • some executionEngine optimizations
  • removed some unused code
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/WorkspaceManager/Execution/ExecutionEngine.cs

    r1876 r1882  
    430430            //7. Send execute messages to possible executable next plugins
    431431            //runNextPlugins();
    432         }
    433 
    434         /// <summary>
    435         /// Send execute messages to possible executable next plugins
    436         /// </summary>
    437         public void runNextPlugins()
    438         {           
    439             foreach (ConnectorModel connectorModel in PluginModel.InputConnectors)
    440             {
    441                 foreach (ConnectionModel connectionModel in connectorModel.InputConnections)
    442                 {
    443                     if (!connectionModel.From.PluginModel.Startable ||
    444                         (connectionModel.From.PluginModel.Startable && connectionModel.From.PluginModel.RepeatStart))
    445                     {
    446                         if (mayExecute(connectionModel.From.PluginModel))
    447                         {
    448                             MessageExecution message_exec = new MessageExecution();
    449                             message_exec.PluginModel = connectionModel.From.PluginModel;
    450                             connectionModel.From.PluginModel.PluginProtocol.BroadcastMessageReliably(message_exec);
    451                         }
    452                     }
    453                 }
    454             }
    455         }
     432        }       
    456433     
    457434        /// <summary>
     
    460437        public void clearInputs()
    461438        {
    462             foreach (ConnectorModel connectorModel in PluginModel.InputConnectors)
     439            List<ConnectorModel> inputConnectors = PluginModel.InputConnectors;
     440            foreach (ConnectorModel connectorModel in inputConnectors)
    463441            {
    464442                if (connectorModel.HasData)
     
    468446                    connectorModel.GuiNeedsUpdate = true;
    469447
    470                     foreach (ConnectionModel connectionModel in connectorModel.InputConnections)
     448                    List<ConnectionModel> inputConnections = connectorModel.InputConnections;
     449                    foreach (ConnectionModel connectionModel in inputConnections)
    471450                    {
    472451                        connectionModel.Active = false;
     
    484463        {
    485464            //Fill the plugins inputs with data
    486             foreach (ConnectorModel connectorModel in PluginModel.InputConnectors)
     465            List<ConnectorModel> inputConnectors = PluginModel.InputConnectors;
     466            foreach (ConnectorModel connectorModel in inputConnectors)
    487467            {
    488468                try
     
    535515
    536516            //Check if all necessary inputs are set
    537             foreach (ConnectorModel connectorModel in pluginModel.InputConnectors)
     517            List<ConnectorModel> inputConnectors = pluginModel.InputConnectors;
     518            foreach (ConnectorModel connectorModel in inputConnectors)
    538519            {
    539520                if (!connectorModel.IControl &&
     
    546527
    547528            //Check if all outputs are free
    548             foreach (ConnectorModel connectorModel in pluginModel.OutputConnectors)
     529            List<ConnectorModel> outputConnectors = pluginModel.OutputConnectors;
     530            foreach (ConnectorModel connectorModel in outputConnectors)
    549531            {
    550532                if (!connectorModel.IControl)
    551533                {
    552                     foreach (ConnectionModel connectionModel in connectorModel.OutputConnections)
     534                    List<ConnectionModel> outputConnections = connectorModel.OutputConnections;
     535                    foreach (ConnectionModel connectionModel in outputConnections)
    553536                    {
    554537                        if (connectionModel.To.HasData)
Note: See TracChangeset for help on using the changeset viewer.