1 Reply Latest reply on Oct 27, 2008 11:06 AM by Newsgroup_User

    ExternalInterface Performance

    cnunciato
      Hi there:

      I'm using Flex 3 in the UI of a Windows app (Flash player as an embedded ActiveX control), and passing data between them with ExternalInterface (primarily into the Flex app, as opposed to out). I'm finding, though, that the performance is pretty awful, particularly with larger (i.e., custom) objects; the more EI calls we make, and the larger the custom objects as pass in, the harder things seem to drop off performance-wise.

      I'm assuming there's a good deal of overhead in serializing these objects, so I'm wondering, are there any best practices out there for using ExternalInterface in this particular way? There doesn't seem to be much out there in terms of documentation on this subject yet.

      Is it better, say, to pass a large block of XML into the player control as a string, and parse it with Flex, than to pass it as a custom object, as a rule? How should Flex apps requiring a relatively tight integration with their host apps best use ExternalInterface without sacrificing performance? Is EI performance an issue Adobe is addressing? Any implementation differences between players 9 and 10? What kinds of things should we avoid to get the most out of this feature?

      Thanks in advance!

      Chris
        • 1. Re: ExternalInterface Performance
          Level 7

          "cnunciato" <webforumsuser@macromedia.com> wrote in message
          news:ge4rda$m9$1@forums.macromedia.com...
          > Hi there:
          >
          > I'm using Flex 3 in the UI of a Windows app (Flash player as an embedded
          > ActiveX control), and passing data between them with ExternalInterface
          > (primarily into the Flex app, as opposed to out). I'm finding, though,
          > that
          > the performance is pretty awful, particularly with larger (i.e., custom)
          > objects; the more EI calls we make, and the larger the custom objects as
          > pass
          > in, the harder things seem to drop off performance-wise.
          >
          > I'm assuming there's a good deal of overhead in serializing these objects,
          > so
          > I'm wondering, are there any best practices out there for using
          > ExternalInterface in this particular way? There doesn't seem to be much
          > out
          > there in terms of documentation on this subject yet.
          >
          > Is it better, say, to pass a large block of XML into the player control as
          > a
          > string, and parse it with Flex, than to pass it as a custom object, as a
          > rule?
          > How should Flex apps requiring a relatively tight integration with their
          > host
          > apps best use ExternalInterface without sacrificing performance? Is EI
          > performance an issue Adobe is addressing? Any implementation differences
          > between players 9 and 10? What kinds of things should we avoid to get the
          > most
          > out of this feature?

          http://codinginparadise.org/weblog/2006/02/how-to-speed-up-flash-8s.html

          This may or may not help, given it was written for Flash 8.

          I've found that often a perceived long load is caused by what happens once
          you get the data--i.e. the things you need to do to display the state of the
          data visually. It may be that you can help by slimming that part down as
          well.

          HTH;

          Amy