[Laszlo-user] Splash while waiting on compile
andy at riftware.com
Thu Jun 29 10:41:51 EDT 2006
From: P T Withington [mailto:ptw at openlaszlo.org]
Sent: Thursday, June 29, 2006 8:24 AM
To: Andrew Chandler
Cc: Laszlo-user at openlaszlo.org
Subject: Re: [Laszlo-user] Splash while waiting on compile
On 2006-06-29, at 00:23 EDT, Andrew Chandler wrote:
> I'm trying to reduce the 30 second to initial page view experience
> with our
> app. I've read the deployment guide and fixed the compile check
> to never
> which helps a lot with subsequent page reloads, however the first one
> tomcat startup can still be a doozy. Thoughts and help?
Does your app need the server? SOLO apps are statically compiled so
eliminate any waiting for compilation.
Yes we do need the server - we do dynamic work as well as the static work.
Mind you the lzx isn't necessarily written dynamically on the particular web
app I'm working but datasets and connections etc are all invoked through the
> 1: Is it possible to display a splash WHILE the page you want is
> Everytime I use the splash element it of course doesn't display exept
> for a
> tiny flash just about when the rest of the stuff becomes visible.
> This of
> course is because the item wasn't ready yet. I need to display
> to show that the request for the page was received and the server is
> working on it.
You could write a small Flash or SOLO app that gets replaced by your app
when it is loaded, but you really shouldn't need to if you either convert
your app to SOLO or pre-fill the server cache (see below).
> 2: Has anyone yet come up with a servlet that can be loaded at
> container startup that just iterates over the list of lzx files and
> tries doing a request (triggering compilation) in the background - not
> to actually display
> anywhere but just to get the resources ready? Is there a better
> way? I
> initially thought to use the command line batch file but it doesn't
> seem to work as well as I'd hope and it seems like the cache is
> cleared on tomcat restart anyhow.
You want to look at the build system for a distribution. This uses a script
with curl or wget to prefetch apps and then saves the compiler, data, etc.
caches in the servlet so there is no compilation in your distributed app.
We're cross platform and our application installer weighs in at around 100MB
at this point already, my concern is that wget isn't available on all
platforms and shipping the compiled cache might be bulky (not so worried
about the .swf files though). If you're saying that it could be done on
the build system itself the build system isn't running a laszlo server - it
uses ant to checkout, compile and package up the installers. That's why I
had thought possibly a servlet started at tomcat startup operating either
off a list of known relative url's or iterating over the lzx directory we
ship could solve the problem. I will go look at the build scripts though.
More information about the Laszlo-user