[Seaside] My progress with Seaside...

Jeremy Shute shutej at crazilocks.com
Wed Jan 4 17:32:53 CET 2006


My progress with Seaside has been impeded by a few things.  It might be
helpful to others to try and "troubleshoot" these on the mailing list.

* <frameset>.  Right now there's really no good support for showing things
in frames.  I had to override WARenderLoopMain, WARenderLoop,
WARenderedHtmlRoot, and WARender in order to simply replace the <body> tag
with <frameset>, and once I have done that, there is still no support for
targetting different frames with callbacks and events.

* Speed.  The profiler is a great tool -- it's telling me my page takes ~3
seconds to render.  About 80% of the time is spent on a component that is
being repeatedly rendered.  You can see the TagBrush code chugging:

[[          |      26.2% {60ms} WAAnchorTag>>with:
[[          |        |26.2% {60ms} WAAnchorTag(WATagBrush)>>with:
[[          |        |  26.2% {60ms}
WAHtmlStreamDocument>>openTag:attributes:
[[          |        |    26.2% {60ms}
WAHtmlStreamDocument>>writeOpenTag:attributes:on:
[[          |        |      26.2% {60ms} WAHtmlAttributes>>writeOn:
[[          |        |        26.2% {60ms}
WAHtmlAttributes>>writeAttribute:on:
[[          |        |          23.6% {54ms} WAAbstractHtmlBuilder
class>>encode:
[[          |        |            |19.1% {44ms}
Array(SequenceableCollection)>>at:ifAbsent:
[[          |        |          2.7% {6ms} RWBinaryOrTextStream>>nextPut:
[[          |        |            2.7% {6ms}
RWBinaryOrTextStream(WriteStream)>>nextPut:
[[          |      18.7% {43ms} WARenderCanvas>>ajax
[[          |        |13.3% {30ms} WAUrl>>withParameter:
[[          |        |  |13.3% {30ms} WAUrl>>copy
[[          |        |  |  11.6% {27ms} WAUrl>>addToPath:
[[          |        |  |    11.6% {27ms} ByteString(String)>>findTokens:
[[          |        |  |      8.0% {18ms}
ByteString(String)>>findDelimiters:startingAt:
[[          |        |  |        6.2% {14ms} Character>>=
[[          |        |5.3% {12ms} WACallbackRegistry>>registerActionCallback:
[[          |        |  5.3% {12ms} WACallbackRegistry>>storeCallback:
[[          |        |    5.3% {12ms} WARenderingContext>>storeCallback:
[[          |        |      5.3% {12ms} WARenderingContext>>advanceKey
[[          |        |        5.3% {12ms} WARenderingContext>>nextKey
[[          |        |          5.3% {12ms}
SmallInteger(Object)>>displayString
[[          |        |            5.3% {12ms} SmallInteger(Object)>>asString
[[[3.6% {8ms} SmallInteger(Number)>>printString
[[          |      17.8% {41ms} WAAnchorTag>>onClick:
[[          |        |17.8% {41ms} WAAnchorTag(WATagBrush)>>onClick:
[[          |        |  17.8% {41ms} WAHtmlAttributes>>at:append:separator:
[[          |        |    12.4% {28ms} SUAjax(Object)>>displayString
[[          |        |      |12.4% {28ms} SUAjax(Object)>>asString
[[          |        |      |  12.4% {28ms} SUAjax(Object)>>printString
[[          |        |      |    12.4% {28ms}
SUAjax(Object)>>printStringLimitedTo:
[[          |        |      |      12.4% {28ms} SUAjax(SUPrototype)>>printOn:
[[[10.2% {23ms} SUJoin>>asJavascript
[[[  6.2% {14ms} OrderedCollection(Collection)>>asJavascript
[[[    |4.0% {9ms} Association>>asJavascript
[[[  4.0% {9ms} ByteString(String)>>asJavascript
[[[    4.0% {9ms} ByteString(Object)>>printString
[[[      4.0% {9ms} ByteString(Object)>>printStringLimitedTo:
[[[        4.0% {9ms} String class(SequenceableCollection
class)>>streamContents:limitedTo:
[[[          4.0% {9ms} LimitedWriteStream class(PositionableStream
class)>>on:
[[[            4.0% {9ms} LimitedWriteStream(WriteStream)>>on:
[[          |        |    5.3% {12ms} String class(SequenceableCollection
class)>>streamContents:
[[          |      6.7% {15ms} WAAnchorTag>>actionUrl
[[          |        |6.7% {15ms} WAUrl>>withParameter:
[[          |        |  6.7% {15ms} WAUrl>>copy
[[          |        |    6.7% {15ms} WAUrl>>addToPath:
[[          |        |      6.7% {15ms} ByteString(String)>>findTokens:
[[          |        |        6.7% {15ms}
ByteString(String)>>findDelimiters:startingAt:
[[          |        |          4.4% {10ms} Character>>=
[[          |      5.8% {13ms} WAHtmlAttributes>>at:ifAbsentPut:
[[          |        5.8% {13ms} WAHtmlAttributes>>at:ifAbsent:
[[          |          4.0% {9ms} WAHtmlAttributes>>associations
[[          |            4.0% {9ms} Dictionary>>associations

The API is beautiful (and the cascading solves a lot of the issues I had
using the old API).  However, I cannot get my pages to load fast enough. 
My goal is for any page to load in under a second.  There doesn't seem to
be one glaringly obvious region for speed improvements...  What can I do?

* Event propogation.  I can't figure out how to have an "href" that goes
somewhere in a text browser and an onClick event that returns "false" to
stop it triggering if Javascript is enabled.  Manually setting the "href"
attribute stops the "javascript:void(0)" behavior, but is there an easy
way to get the event to stop its propogation, such that both Javascript
and non-Javascript behavior can coexist?

* Bandwidth.  Loading up the SUScriptLibrary for AJAX support, I get
another 120K worth of stuff that I just plain don't need.  Yes, 95%+
browsers support AJAX, but half the country is still on a modem!  The
whole point of AJAX is to make a snappy application!  I see two options to
fix this: meet my own requirements by returning to the V2.5 way of doing
things (i.e. manually port the much slimmer 2.5 AJAX code), or write
Javascript dependency graph analysis code that only sends what you use
(which is a nightmare without some additional declarations).  REALLY, I'd
like an "AJAX lite" library that has all the handlers but none of the
animation: is there a way to get 2.5 functionality back?

Thanks,

Jeremy

GPG PUBLIC KEY: 0xA2B36CE5



More information about the Seaside mailing list