2 Replies Latest reply on Oct 17, 2007 1:45 PM by Greg (Adobe)

    Yahoo Maps drives CPU up to 99% in design view

      This problem is happening to both myself and my co-developer on two separate, but similar PC's.
      The sun is shining, the sky is blue, all is happy in the source view, but upon adding a YahooMap component to an application when I go into the design view, FB3 (sa or plugin doesn't matter) slamps the CPU up to 99% utilization and will not respond anymore. My first though was that it was something I was doing with the component. So, I created a new empty project hooked in all the Yahoo Astra stuff and then added just the Map component to my empty application. Instantly the CPU flew up to 99% and Eclipse stopped responding.


        • 1. Re: Yahoo Maps drives CPU up to 99% in design view
          Greg (Adobe)
          I suspect that the YahooMap component is trying to unsucessfully run some operation. Design view creates actual instances of the components declared in the mxml file, and the code for that component runs when in design view.

          My guess is that the YahooMap component, upon creation, executes some code that tries to establish a network connection or otherwise assumes that it is running in a browser. That operation fails in design view, and the map component enters some kind of infinite loop where is keeps retrying the operation.

          We will take a look at this problem and try to resolve it by either modifying Flex Builder or working with Yahoo to adjust their components to work better in design view.

          -- Greg Dow
          -- Adobe Flex Builder Team
          • 2. Re: Yahoo Maps drives CPU up to 99% in design view
            Greg (Adobe) Level 1
            My initial guess was correct. The YahooMapService sets its "source" property to a mapURL that causes design view to go into an infinite update loop. You can make a small change to YahooMapService.as (and rebuild the SWC) to work around the problem.

            In YahooMapService.as draw(), check the designTime flag before setting the source property as follows:

            if (!UIComponentGlobals.designTime)
            this.source = mapURL + "?&swfDomId=" + swfDomId + "&id=" + UUID + "&url=" + escape( mapURL );

            and also add

            import mx.core.UIComponentGlobals;

            in the "import" section of that file.

            Then, create a new Flex Library project for the ActionScript 3 Astra source and rebuild the SWC.

            -- Greg Dow
            -- Adobe Flex Builder Team