[Laszlo-user] Understanding Flash memory usage when using Laszlo
Henry Minsky
henry.minsky at gmail.com
Sat Apr 19 03:32:53 PDT 2008
It appears that the drawview has a "cachebitmap" attribute already, which
sets the cacheAsBitmap flag on the Flash movieclip which it is using. . So
it should already be being
set on drawview by default.
See the code in lps/components/extensions/drawview.lzx to see how it is
being initialized.
On Sat, Apr 19, 2008 at 4:50 AM, Gilad Parann-Nissany <
gilad.parann.nissany at g.ho.st> wrote:
> Thank you for the input. Could you give us concrete code examples of:
>
> 1. calling ActionScript directly in our OL code
>
> 2. using drawview (or any other technique) to create a bitmap cache of our
> SWFs. Note: we can limit ourselves to "simple views' (views that do not nest
> other views) as a first step if necessary.
>
> Gilad
>
>
>
> Gilad Parann-Nissany
>
>
> ----- Original Message -----
> From: "Max Carlson" <max at openlaszlo.org>
> To: "P T Withington" <ptw at laszlosystems.com>
> Cc: "Gilad Parann-Nissany" <gilad.parann.nissany at g.ho.st>, "Max Carlson" <
> max at laszlosystems.com>, "laszlo-user" <laszlo-user at openlaszlo.org>, "Ammar
> Tamazi" <Ammar.Tazami at corp.G.ho.st>, "Elias Khalil" <
> Elias.Khalil at corp.G.ho.st>, "Lou Iorio" <liorio at laszlosystems.com>
> Sent: Thursday, April 17, 2008 7:18:24 PM (GMT+0200) Auto-Detected
> Subject: Re: Understanding Flash memory usage when using Laszlo
>
>
>
> P T Withington wrote:
> > On 2008-04-17, at 09:12 EDT, Gilad Parann-Nissany wrote:
> >> Hi
> >>
> >> With the help from this forum we have been making progress
> >> understanding our memory usage. See the separate thread: [Laszlo-user]
> >> Understanding memory analysis when using _LzDebug.whyAlive()
> >>
> >> We're now at the point were we see that the "smoots" taken up by
> >> Laszlo objects are not all of our memory usage. It seems a large part
> >> (large percentage of total RAM usage, maybe even more than 50%) may be
> >> used elsewhere, perhaps in the Flash objects that are "underneath" the
> >> Laszlo objects.
> >>
> >> Questions:
> >>
> >> 1. Is there any tool or technique that allows us to analyze exactly
> >> how this memory is being used by Flash? ("underneath" the laszlo
> >> objects, I mean)
> >
> > I am not aware of such a tool. There may be a tool provided by Adobe.
>
> Actually, this will be a nice benefit from the move to swf9. Flex
> builder (and presumably fdb) have profiling tools that can show this
> kind of memory usage.
>
> >> 2. Are there any guidelines to help us optimize this Flash part of
> >> our memory usage?
> >> 3. More generally is there any way to use Flash-specific
> >> optimization techniques (going to the ActionScript where necessary).
> >> We know that in pure Flash there are several optimization techniques;
> >> the following points are examples of things we wish to try
> >> 4. Can we in general call pieces of ActionScript from Laszlo script?
> >
> > Yes. The OL compiler does not prevent you from doing that, but neither
> > is it supported.
> >
> >> 5. Bitmap caching:
> >>
> >>
> >> • SWF resources can be translated once into bitmaps (on the
> >> client side) and cached
> >> • you probably know this is known as bitmap caching.
> >> • Then the bitmaps are used repeatedly instead of rendering the
> >> SWF objects repeatedly.
> >> • Can we do Bitmap Caching for all those vector graphics which
> >> do not change frequently (from Laszlo, but possibly with specific
> >> usage of Actionscript if necessary)
> >
> > I believe Max (cc-ed) has experimented with this. There may even be
> > support in LZX for it.
>
> We do have support for this in drawview. We can experiment with adding
> support for vector resources as well. There seemed to be side effects
> for things with nested views, for example.
>
> >> 6.
> >> Garbage collection: we would like to trigger the Flash garbage
> >> collection just to test what is going on (as a test not permanent
> >> change). Any way for us to do this?
> >
> > I am not aware of a programmatic way of doing that. In most browsers,
> > if you minimize the window the app is running in the Flash GC will run.
> >
> > Again, there are probably tools provided by Adobe for these purposes,
> > but I have not used them. There are probably more tools in the open
> > source Flex compiler, so the swf9 runtime should be easier to measure
> > and tune in this respect.
>
> --
> Regards,
> Max Carlson
> OpenLaszlo.org
>
>
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20080419/b82d7ca1/attachment.html
More information about the Laszlo-user
mailing list