You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Laurentiu Trica <la...@codebeat.ro> on 2007/05/30 10:33:32 UTC

PPR Panel and dojo.js

Hi

I have some troubles using PPR Panel because the code becomes much bigger
and the page loads with 2-3 seconds slower.
Is dojo.js used by PPR Panel cached at browser level or not? Because if it
is cached, the page shouldn't load so slow.
Can anybody help? Do you have some suggestions?

-- 
Best regards,
Laurentiu
www.codebeat.ro

Re: PPR Panel and dojo.js

Posted by Andrew Robinson <an...@gmail.com>.
That would happen if it is not properly configured. I would move that
question to the A4J message board.

As for slower, I haven't heard that, and in fact I find A4J much
faster than other JSF AJAX providers.

On 5/30/07, Laurentiu Trica <tr...@gmail.com> wrote:
> I understand
>
> I heard that on the server side A4J is much slower...
> And I keep getting an error while trying to use it:
> 2007-05-30 18:14:53,406 | ERROR
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/].[Faces
> Servlet] - Servlet.service() for servlet Faces Servlet threw exception
> java.lang.NullPointerException
>     at
> org.ajax4jsf.framework.ajax.AjaxViewHandler.createView(AjaxViewHandler.java:78)
>     at
> org.apache.myfaces.lifecycle.RestoreViewExecutor.execute
> (RestoreViewExecutor.java:83)
>     at
> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
>     at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
>     at javax.faces.webapp.FacesServlet.service
> (FacesServlet.java:213)
>     at
> org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java:77)
>     at
> org.kobit.ofam.gui.jsf.OFAMFacesServlet.service(OFAMFacesServlet.java:54)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:252)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>     at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java
> :672)
>     at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465)
>     at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
>     at
> org.apache.catalina.core.ApplicationDispatcher.forward
> (ApplicationDispatcher.java:301)
>     at
> org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363)
>     at
> org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:284)
>     at org.apache.catalina.core.StandardHostValve.throwable
> (StandardHostValve.java:228)
>     at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134)
>     at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>     at org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java:107)
>     at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>     at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>     at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> (Http11BaseProtocol.java:664)
>     at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>     at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java
> :80)
>     at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>     at java.lang.Thread.run(Thread.java:595)
>
> Have you encountered this before? Can you help me get rid of this?
>
> Thank you!
>
>
> On 5/30/07, Andrew Robinson <an...@gmail.com> wrote:
> > A4J is quite mature IMO at this point and with a lot of features. I
> > would recommend it over using a sandbox technology.
> >
> > On 5/30/07, Laurentiu Trica <tricasoft@gmail.com > wrote:
> > > Werner have you used Ajax4JSF?
> > > Can it be faster than using PPR that uses dojo.js?
> > > I just need the PPR functionality and the client is complaining about
> the
> > > speed of the page when using PPR.
> > >
> > >  On 5/30/07, Werner Punz <we...@gmail.com> wrote:
> > > > Laurentiu Trica schrieb:
> > > > > Hi Werner
> > > > >
> > > > > Can you tell me where should this be put to be sure it is optimizing
> > > > > something?
> > > > > I put it on the first lines of my xhtml file. Is that ok?
> > > > > It still doesn't makes any difference.
> > > > >
> > > >
> > > > You can put it everywhere into your code, just make sure that you do
> not
> > > > set the params again afterwards... the placement optimization is
> already
> > > > done by the initializer before rendering.
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Best regards,
> > > Laurentiu
> > > www.codebeat.ro
> >
>
>
>
> --
>
> Best regards,
> Laurentiu
> www.codebeat.ro

Re: PPR Panel and dojo.js

Posted by Laurentiu Trica <tr...@gmail.com>.
I understand

I heard that on the server side A4J is much slower...
And I keep getting an error while trying to use it:
2007-05-30 18:14:53,406 | ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/].[Faces
Servlet] - Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
    at org.ajax4jsf.framework.ajax.AjaxViewHandler.createView(
AjaxViewHandler.java:78)
    at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(
RestoreViewExecutor.java:83)
    at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(
LifecycleImpl.java:95)
    at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java
:70)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
    at org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java
:77)
    at org.kobit.ofam.gui.jsf.OFAMFacesServlet.service(OFAMFacesServlet.java
:54)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(
ApplicationDispatcher.java:672)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(
ApplicationDispatcher.java:465)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(
ApplicationDispatcher.java:398)
    at org.apache.catalina.core.ApplicationDispatcher.forward(
ApplicationDispatcher.java:301)
    at org.apache.catalina.core.StandardHostValve.custom(
StandardHostValve.java:363)
    at org.apache.catalina.core.StandardHostValve.status(
StandardHostValve.java:284)
    at org.apache.catalina.core.StandardHostValve.throwable(
StandardHostValve.java:228)
    at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:134)
    at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:869)
    at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:664)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)

Have you encountered this before? Can you help me get rid of this?

Thank you!

On 5/30/07, Andrew Robinson <an...@gmail.com> wrote:
>
> A4J is quite mature IMO at this point and with a lot of features. I
> would recommend it over using a sandbox technology.
>
> On 5/30/07, Laurentiu Trica <tr...@gmail.com> wrote:
> > Werner have you used Ajax4JSF?
> > Can it be faster than using PPR that uses dojo.js?
> > I just need the PPR functionality and the client is complaining about
> the
> > speed of the page when using PPR.
> >
> >  On 5/30/07, Werner Punz <we...@gmail.com> wrote:
> > > Laurentiu Trica schrieb:
> > > > Hi Werner
> > > >
> > > > Can you tell me where should this be put to be sure it is optimizing
> > > > something?
> > > > I put it on the first lines of my xhtml file. Is that ok?
> > > > It still doesn't makes any difference.
> > > >
> > >
> > > You can put it everywhere into your code, just make sure that you do
> not
> > > set the params again afterwards... the placement optimization is
> already
> > > done by the initializer before rendering.
> > >
> > >
> >
> >
> >
> > --
> > Best regards,
> > Laurentiu
> > www.codebeat.ro
>



-- 
Best regards,
Laurentiu
www.codebeat.ro

Re: PPR Panel and dojo.js

Posted by Andrew Robinson <an...@gmail.com>.
A4J is quite mature IMO at this point and with a lot of features. I
would recommend it over using a sandbox technology.

On 5/30/07, Laurentiu Trica <tr...@gmail.com> wrote:
> Werner have you used Ajax4JSF?
> Can it be faster than using PPR that uses dojo.js?
> I just need the PPR functionality and the client is complaining about the
> speed of the page when using PPR.
>
>  On 5/30/07, Werner Punz <we...@gmail.com> wrote:
> > Laurentiu Trica schrieb:
> > > Hi Werner
> > >
> > > Can you tell me where should this be put to be sure it is optimizing
> > > something?
> > > I put it on the first lines of my xhtml file. Is that ok?
> > > It still doesn't makes any difference.
> > >
> >
> > You can put it everywhere into your code, just make sure that you do not
> > set the params again afterwards... the placement optimization is already
> > done by the initializer before rendering.
> >
> >
>
>
>
> --
> Best regards,
> Laurentiu
> www.codebeat.ro

Re: PPR Panel and dojo.js

Posted by Werner Punz <we...@gmail.com>.
Laurentiu Trica schrieb:
> Werner have you used Ajax4JSF?
> Can it be faster than using PPR that uses dojo.js?
> I just need the PPR functionality and the client is complaining about
> the speed of the page when using PPR.
> 
I dont think that you will get a lot more speed, although I can
recommend it due to maturity reasons.

The main problem might be that the rendering or rerendering itself might
be slow or you have a speed hit on the server itself.

All what ppr does is to set a call to get some dhtml via the jsf cycle,
and then to push it into the outer div by using innerHTML, to sum it up.
Now if you already have a slow reaction on the server then this will not
help, if your form is very complex and older browsers are often somewhat
slow, you also will get some sluggish performance.

I am not sure if ajax4jsf really will resolve your issues.


Re: PPR Panel and dojo.js

Posted by Laurentiu Trica <tr...@gmail.com>.
Werner have you used Ajax4JSF?
Can it be faster than using PPR that uses dojo.js?
I just need the PPR functionality and the client is complaining about the
speed of the page when using PPR.

On 5/30/07, Werner Punz <we...@gmail.com> wrote:
>
> Laurentiu Trica schrieb:
> > Hi Werner
> >
> > Can you tell me where should this be put to be sure it is optimizing
> > something?
> > I put it on the first lines of my xhtml file. Is that ok?
> > It still doesn't makes any difference.
> >
>
> You can put it everywhere into your code, just make sure that you do not
> set the params again afterwards... the placement optimization is already
> done by the initializer before rendering.
>
>


-- 
Best regards,
Laurentiu
www.codebeat.ro

Re: PPR Panel and dojo.js

Posted by Werner Punz <we...@gmail.com>.
Laurentiu Trica schrieb:
> Hi Werner
> 
> Can you tell me where should this be put to be sure it is optimizing
> something?
> I put it on the first lines of my xhtml file. Is that ok?
> It still doesn't makes any difference.
> 

You can put it everywhere into your code, just make sure that you do not
set the params again afterwards... the placement optimization is already
done by the initializer before rendering.


Re: PPR Panel and dojo.js

Posted by Laurentiu Trica <tr...@gmail.com>.
Hi Werner

Can you tell me where should this be put to be sure it is optimizing
something?
I put it on the first lines of my xhtml file. Is that ok?
It still doesn't makes any difference.

On 5/30/07, Werner Punz <we...@gmail.com> wrote:
>
> Laurentiu Trica schrieb:
> > Hi
> >
> > I have some troubles using PPR Panel because the code becomes much
> > bigger and the page loads with 2-3 seconds slower.
> > Is dojo.js used by PPR Panel cached at browser level or not? Because if
> > it is cached, the page shouldn't load so slow.
> > Can anybody help? Do you have some suggestions?
> >
>
> one thing which adds some additional optimization if you do not use the
> dojo tags is following:
>
> <t:dojoInitializer parseWidgets="false" searchIds="[]" />
>
> give it a try and see if it helps...
>
>


-- 
Best regards,
Laurentiu
www.codebeat.ro

Re: PPR Panel and dojo.js

Posted by Werner Punz <we...@gmail.com>.
Laurentiu Trica schrieb:
> Hi
> 
> I have some troubles using PPR Panel because the code becomes much
> bigger and the page loads with 2-3 seconds slower.
> Is dojo.js used by PPR Panel cached at browser level or not? Because if
> it is cached, the page shouldn't load so slow.
> Can anybody help? Do you have some suggestions?
> 

one thing which adds some additional optimization if you do not use the
dojo tags is following:

<t:dojoInitializer parseWidgets="false" searchIds="[]" />

give it a try and see if it helps...