1 Reply Latest reply on Jan 16, 2013 5:26 PM by Flex harUI

    fabridge is extremly slow and why is drawPath() missing?


      I am creating an abstract graphics Javascript library where the flex/flash is one of the options (besides vml, canvas, svg).  What I noticed is that drawing rate using Graphics.moveTo/lineTo methods is about 300 vertices per second which is about two orders of magnitude slower than Canvas/Svg on modern browsers, and even much slower than Microsoft's legacy VML.


      A single shape with a few hundred vertices taking seconds to draw is not acceptable by any means. I am not really sure where the bottleneck is (whether it is a JS bridge or Flash itself) I only see that CPU is fully occupied by the Flash plugin.


      Taking a look at the Graphics API, I noticed a batch drawing function drawPath() which is supposedly to speed up rendering by reducing number of calls. Unfortunately, when I try to call this method on a Graphics proxy object, the error is thrown, that there is no such function.


      I could not find any api documentation on FABridge, so not sure if this is function is missing by intention or I am doing something wrong.


      P.S. I am testing with Flash 11.5

        • 1. Re: fabridge is extremly slow and why is drawPath() missing?
          Flex harUI Adobe Employee

          Try creating an all-Flash test case.  I would suspect it can handle quite a few shapes.  But don’t forget to call clear() before re-drawing.  That’s a common mistake that causes things to slow down.


          The bridge is not highly efficient.  You can run the player in its profiler and see where the time is going.


          DrawPath is a relatively new API.  You have to set the swf-version in the SWF to be able to use it, and have a recent player (10 or later I think, but check the doc).