1 Reply Latest reply on May 22, 2006 1:19 PM by Newsgroup_User

    Performance impact when using ExternalInterface.call() in Flex2

    Joekin Level 1
      Will there be any signicant performance impact if the ExternalInterface.call() is used frequently in a Flex2 app? Compared to normal ActionScript method calls, will there be considerable overhead for this method? Thanks.
        • 1. Re: Performance impact when using ExternalInterface.call() in Flex2
          Level 7
          The answer really depends on how often you are calling
          ExternalInterface.call(), and how much work is being done in JavaScript.

          Calling out to JavaScript can be significantly slower than doing the
          equivalent in ActionScript. In other words, you probably don't want to be
          using ExternalInterface.call() from inside a tight loop. However, if you are
          making infrequent calls, and the JavaScript isn't too heavy, you shouldn't
          detect any performance problems.

          When possible, it is best to stay in each environment as long as possible.
          For example, rather than calling ExternalInterface.call() 100 times from
          inside an ActionScript loop, it would be better to put the loop in
          JavaScript and call it once.