[Laszlo-dev] For Review: Change 20071214-ptw-i Summary: Make the memory tracer generic
André Bargull
a.bargull at intensis.de
Mon Dec 17 14:53:42 PST 2007
Approved!
notes:
- Debug.isMarked has had special "instanceof MovieClip" code, was it
removable?
- __LzLeaks#initialize(..): missing non-"try..catch" block for $as2
- Debug.traceStep: doc-comment could be updated
- Debug.traceStep: comment "The setInterval is 1400ms (because we know
scriptRunningSlowly defaults to 1500)" does not match code
- Debug.initTrace: add comment about 1400ms interval-value, like in
Debug.traceStep
=> What about adding "backgroundTaskInterval=1400" to Debug instead of
having hard-coded values?
On 12/15/2007 12:51 AM, P T Withington wrote:
> Change 20071214-ptw-i by ptw at dueling-banjos.local on 2007-12-14
> 18:23:23 EST
> in /Users/ptw/OpenLaszlo/ringding-2
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Make the memory tracer generic
>
> New Features: Memory tracing now works (for some definition of works)
> in DHTML in addition to SWF.
>
> Technical Reviewer: a.bargull at intensis.de (pending)
> QA Reviewer: promanik at laszlosystems.com (pending)
>
> Documentation:
> Debug.markObjects, findNewObjects, whyAlive now work in SWF and
> DHTML. DHTML is not completely usable yet because it appears that
> some underlying runtimes themselves leak DOM objects (or our usage
> of them causes them to be leaked). It works reasonably well in
> Safari, less well in Firefox, hangs Opera, is untested in IE (but
> IE has its own leak tools).
>
> Release Notes:
>
> Details:
> kernel.js: Initialize the debug window early so memory tracing can
> find it. Use a static style for debugger output, so that a new
> CSSStyle object is not consed for every line of debugger output.
>
> LzMemory.lzs: Make this generic (although there are still some if
> ($as2) bits for now, I think a unified code base is better than
> splitting this into the kernels). Add some metering to see how
> the background tracer is working. Add some documentation. Add
> some try/catch blocks to ignore errors trying to trace native
> wrapped objects in DHTML. Use set/clearInterval instead of the
> old tracer movieclip to run the background task. Fix the path
> evaluator to be correct and platform-neutral. Use
> objectOwnProperties to find slots to trace. Make the code to hide
> the debugger from the leak detector generic, hide the debugger
> DOM tree. Make whyAlive output all relevant data, so it can be
> invoked as a button, not just from the debugger.
>
> Library.lzs: switch from the platform leak detector to the generic
> one.
>
> LzRuntime: Use static style for debugger output.
>
> laszlo-debugger.css: Define that static style.
>
> Tests:
> The following test program works for me (pressing the 3 buttons at
> the appropriate times, creates a leak report):
>
> <canvas debug="true">
> <simplelayout axis="x" />
> <button onclick="Debug.markObjects()">Mark</button>
> <button onclick="Debug.findNewObjects()">Find New</button>
> <button onclick="Debug.whyAlive()">Why Alive</button>
> </canvas>
>
>
> Files:
> D WEB-INF/lps/lfc/debugger/platform/swf/LzMemory.as
> M WEB-INF/lps/lfc/debugger/platform/dhtml/kernel.js
> M WEB-INF/lps/lfc/debugger/LzMemory.lzs
> M WEB-INF/lps/lfc/debugger/Library.lzs
> M WEB-INF/lps/lfc/compiler/LzRuntime.lzs
> M lps/includes/laszlo-debugger.css
>
> Changeset:
> http://svn.openlaszlo.org/openlaszlo/patches/20071214-ptw-i.tar
>
More information about the Laszlo-dev
mailing list