[Seaside] Why could a POST take too much?
Mariano Martinez Peck
marianopeck at gmail.com
Mon May 12 20:48:58 UTC 2014
On Mon, May 12, 2014 at 5:42 PM, Mariano Martinez Peck <
marianopeck at gmail.com> wrote:
>> >> Are you logging the browser response time or is this server-side
>> >> timing? What is the code, etc… ?
>> > I am using the developer tools. I attach 2 screenshots, one POST (normal
>> > one) takes 246ms and the slow one that takes 1.66 seconds in this
>> > Both "submits" were just a click in a menu button.
>> > The menu is renderrd like this:
>> > renderActivityMenuOn: html id: anId
>> > (self showActivityMenu and: [self activityMenu isEmpty not]) ifTrue: [
>> > html div id:'activityMenuDiv'; with: [
>> > html form: [
>> > html
>> > tbsNavbar
>> > id: anId;
>> > beDefault;
>> > with: [
>> > self activityMenu
>> > do: [ :menuAction |
>> > html space.
>> > html
>> > tbsNavbarButton
>> > beSmall;
>> > beActiveIf: ((menuAction = selectedActivityMenuAction) or:
>> > [selectedActivityMenuAction isNil and: [self activityMenu first =
>> > menuAction]]) ;
>> > callback: [menuAction logAndValue: self.
>> > selectedActivityMenuAction := menuAction];
>> > with: [ html text: menuAction label ] ] ] ]]]
>> > So basically it is a form and each menu item is a button.
>> > I don't understand why a POST could take 200ms for one menu item and 1.6
>> > second for another one.
>> > Any idea? how can I debug it?
>> The POST is the callback processing, not the rendering. What do you do
>> in #logAndValue:?
> Hi Philippe,
> I am confused by your statement about "the POST is the callback
> processing". What do you mean?
> In my case, I always get 2 request, one is a POST, which always answer 302
> as status, and it is always very small.
> Then, I have a GET which is the real request and the one that depends on
> the thing I am executing.
> What it is strange is that the first request (the POST that always answer
> 302) in one case it takes 200ms and in another 1.6 seconds.
> the callback time isn't it included in the GET, not in the POST?
what #logAndValue: does is to execute the closure associated to the menu
item I want to go. This menu is being built in component X (my main app
compoment). The closue will end up setting in X instVar 'subcomponent', the
subcomponent to render in it's "main page". So this component X,
renderConentOn: will end up doing a "html render: subcomponent' at some
point in time.
is it clear?
> Thanks for the clarification.
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside