I see. One of the leading performance issues Henry and i saw from profiling swf10 looked to be method closures, at lest from a gc/memory churn standpoint. Approved for now!
On Nov 12, 2010, at 6:11 AM, P T Withington <[email protected]> wrote: > The line you are complaining about is unchanged from the original code. What > is it that is troubling about it? > > Only as3 supports method closures, so the only way you could avoid saying > `context[curvemethod]` would be to duplicate the code. At this point in > time, it seems better to keep a single implementation. If it turns out this > is a performance bottleneck, we can change it later. > > On 2010-11-12, at 04:56, Max Carlson wrote: > >> This line is troubling: >> var curvemethod = context['curveTo'] ? 'curveTo' : 'quadraticCurveTo'. >> >> Can you look up the method reference once ahead of time instead of computing >> its name and looking it up, e.g. context[curvemethod]? >> Perhaps use an if ($dhtml) {...} else {...} clause that stores a reference >> to the method once? >> >> Otherwise approved! >> >> On 11/11/10 1:35 PM, P T Withington wrote: >>> Change ptw-20101111-LWK by [email protected] on 2010-11-11 16:26:03 EST >>> in /Users/ptw/OpenLaszlo/trunk-3 >>> for http://svn.openlaszlo.org/openlaszlo/trunk >>> >>> Summary: Generalize rectangle drawing to support oval borders, CSS >>> defaulting >>> >>> Bugs Fixed: LPP-9484 Strokes in drawbutton shoulld be stylable (partial) >>> >>> Technical Reviewer: [email protected] (pending) >>> QA Reviewer: [email protected] (pending) >>> >>> Details: >>> >>> Made a new method, roundrect, that takes separate horizontal and >>> vertical radii for the corners. All radii must be supplied, >>> defaulting should be done at a higher level. Uses the CSS >>> algorithm for scaling radii to fit small boxes. This low-level >>> method is needed to be able to draw different width borders that >>> smoothly transition around corners. >>> >>> Made rect default its radii arguments according to the CSS >>> defaulting algorithm and call roundrect. >>> >>> Tests: >>> smokecheck, is there a test for rect? >>> >>> Files: >>> M WEB-INF/lps/lfc/kernel/LzKernelUtils.lzs >>> >>> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/ptw-20101111-LWK.tar >
