On Nov 11, 2005, at 11:34 AM, Zaheed Haque wrote:
Just tried Laszlomail! Very interesting application! Very well done. I
am wondering if anyone will share how such a bulky application loads
so fast. Whats is the trick? is there any application optimization
guildeline document?

One trick that I know they're using is deferred instantiation of views. The application is initializing its views while you're typing your login name.

Another that data is paged in on demand. For example, the application requests message headers when you click on a mailbox and even when you scroll through a long message list; it requests the message body only when you click on a message. This means that the application can display an Inbox with hundreds of messages with a smaller initial download than the user experience implies.

I know that Laszlo Studios rewrites slow code to avoid the constraint mechanism. Instead of writing <view id="foo" x="${parent.something}" y="${parent.something}">, they'll write the code that changes parent.something to update foo's x and y instead, replacing several function calls and loops through the constraint system by one function call. I don't know whether Laszlo Mail uses this optimization, or uses it much.

Another (skanky) tip that I don't know whether they use is to replace object.setAttribute('name', value) by object.name = value, avoiding a function call and the event system.

I've added these to the Performance Optimization page at http:// wiki.openlaszlo.org/Performance_Optimization. Sarah Allen of the Mail team actually started this page to collect some of the other tips her team learned from writing Laszlo Mail.


Best,
Oliver

--
Oliver Steele
Chief Software Architect
Laszlo Systems, Inc.


_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to