[Seaside-dev] Re: Configurations

Julian Fitzell jfitzell at gmail.com
Sat Jul 26 12:17:05 UTC 2008


On Sat, Jul 26, 2008 at 7:08 PM, Lukas Renggli <renggli at iam.unibe.ch> wrote:
>> + the name of the preference?
>
> What about just dropping the session prefix? #continuationCacheSize?
>
> The fact that the continuations are within the session is already given as
> the attribute is defined in WASessionConfiguration.

Well, it may be defined on WASessionConfiguration but the namespace
for attribute keys is still global. Namespacing everything by prefix
is not so important for attributes in core, obviously, so as long as
we don't anticipate any other continuation caches any time soon we
could drop it... but it also doesn't bother me *per se* that it's
long. The attribute's only used one place and we can now override the
label shown in the UI to be shorter.

>> + the name and existence of #performDefaultRequest:
>>
>> I tend to think the complex chaing of request handling methods sucks
>> and I hate to make it bigger but my thinking was that:
>
> I agree that the long chain of request handling methods suck. It also
> wastest memory when continuations are used. In Seaside 2.8 we reduced if
> from around 120 down to about 50 stack frames. You can see this number in
> WAFlowFunctionalTest (in the context of a flow).

mm... good point.

>> - I can't do what I need to do in the constructor because the
>> application isn't set (no preferences)
>
> What about overriding #setParent: of WASession? This is where the
> application is set and therefore the place to fetch any preferences.
>
>  Name: Seaside-Core-lr.configcleanup.40
>  Author: lr
>  Time: 26 July 2008, 1:06:14 pm
>  UUID: 73e232cf-be36-44a8-9644-f6d6fbc173b1
>  Ancestors: Seaside-Core-jf.configcleanup.36

Yeah I considered doing it that way. I'm fine with that if you like it.

>  - set #sessionContinuationCacheSize in WASession>>#setParent:
>
> Another thing: Do we really need the test "self sessionContinuationCacheSize
> isNil"? I think this can never be nil, as the default value is taken
> otherwise.

Well originally I had no default because I wanted it to use the
default from the code in WALRUCache. Then I didn't like the big
glaring text box in the UI so I decided to put in a default. :)

I was also considering defining WASession>>preferenceAt: as:

preferenceAt: aSymbol
  ^ self application isNil ifFalse: [self application preferenceAt: aSymbol]

since there seems to be code (at least in the tests) that uses
WASession without setting a parent (and if you can't use it without a
parent then it really ought to be passed into the initialization
method).

That was my reasoning.

> Cheers,
> Lukas
>
> PS: I think we should continue this kind of discussion on seaside-dev.

Agreed. Done.

Julian


More information about the seaside-dev mailing list