how much was performance degrading ?
On Dec 16, 2009, at 12:02 AM, Matt Wringe wrote:
On Sun, 2009-12-06 at 19:29 -0500, Matt Wringe wrote:
> On Wed, 2009-12-02 at 15:16 -0500, Matt Wringe wrote:
>> On Wed, 2009-12-02 at 20:31 +0100, Julien Viet wrote:
>>> Have you studied the possibility to make the ui component
>>> UIPortalApplication to buffer the content of its rendered children.
>>
>> The only way to buffer the children it to create a temporary
>> writer and
>> have the children write their content to that. The children by
>> default
>> will try to write directly to the response writer. This was one of
>> the
>> options mentioned in my last email.
>> I already have something almost finished that will do this.
>
> patch for it was added here a few days ago:
>
https://jira.jboss.org/jira/browse/GTNPORTAL-321
>
> The output of the children is sent to a temporary writer before the
> head
> of the page is rendered. Then the page is rendered normally, except
> it
> uses the output from the writer for the child elements.
I committed the patch yesterday but reverted it back due to
performance
degradation with using a temporary writer.
I will need to figure out a way to do with without affecting
performance, or make it configurable so that its off by default.
>>> When the rendering is terminated the UIPortalApplication
>>> component can
>>> do two things:
>>>
>>> 1/ setup the HTTP headers (if we do support it)
>>>
>>> 2/ update its state to store the headers and then have them
>>> pulled by
>>> the template UIPortalApplication.gtmpl
>>>
>>> The control flow could be modified to follow:
>>>
>>> 1/ called process render on its children and buffer the byte array
>>> response
>>> 2/ update its state with the buffered response and the headers
>>> 3/ output HTTP headers
>>> 4/ call render template to render the UIPortalApplication.gtmpl
>>> 5/ in the uicomponent.renderChildren() callback send the buffered
>>> response
>>> 6/ in a finally block clear the transient state (buffered
>>> response and
>>> headers)
>>>
>>> On Dec 2, 2009, at 8:12 PM, Matt Wringe wrote:
>>>
>>>> I am trying to get portlet markup headers working with gatein.
>>>> This
>>>> allows portlets to set content in the html head of the portal
>>>> page.
>>>> This
>>>> only works if the portlets are processed before the page gets
>>>> generated,
>>>> which is currently not the case.
>>>>
>>>> We can get around this by creating a preRender phase to the webui
>>>> lifecycle. This phase would generate the markup for the
>>>> uicomponent
>>>> and
>>>> store it. When the processRender phase occurs, it will just
>>>> retrieve
>>>> this stored markup.
>>>> Adding a new phase to the lifecycle is going to require a bunch of
>>>> changes to webui.
>>>>
>>>> I already have a simple proof of concept with a preRender phase
>>>> that
>>>> is
>>>> working with portlets to allow setting the html head.
>>>>
>>>> Before I get too far with this, I would to know if anyone else
>>>> has any
>>>> better ideas about how to handle this.
>>>>
>>>> We could modify the html head using javascript that gets called
>>>> when
>>>> the
>>>> page is loaded. This will work and would be easy to implement, but
>>>> seems
>>>> like a hack.
>>>>
>>>> I looked into seeing if we could just modify how the
>>>> UIPortalApplication
>>>> gets rendered so that we wouldn't need to touch the rest of the
>>>> webui
>>>> lifecyle. We could do something like render the html body to a
>>>> temporary
>>>> writer first, but this is a messy hack.
>>>>
>>>> _______________________________________________
>>>> gatein-dev mailing list
>>>> gatein-dev(a)lists.jboss.org
>>>>
https://lists.jboss.org/mailman/listinfo/gatein-dev
>>>
>>
>> _______________________________________________
>> gatein-dev mailing list
>> gatein-dev(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/gatein-dev
>
_______________________________________________
gatein-dev mailing list
gatein-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/gatein-dev