myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danny Robinson" <>
Subject [Trinidad] PPR Optimization - Would this work?
Date Mon, 14 May 2007 13:07:50 GMT

Great to finally meet face-to-face at JavaOne.  During our conversation we
talked about PPR performance and how we could make some optimizations.  One
suggestion you had was to implement a naming container that didn't render
its children during a PPR request, unless one of its children was registered
for ppr update.  I've implemented this and it *seems* to be working fine.
However, I just wanted to double-check if this approach wouldn't interfere
with the saved state of the component model or any other area of the
framework?  The code  implemented is below.



    boolean renderChildren = true;

    if (RequestContext.getCurrentInstance().isPartialRequest(context))

      if (_LOG.isInfo())"Checking partialZone: " + component.getClientId

      // Default to not render during PPR...
      renderChildren = false;
      for (Iterator iter = RenderingContext.getCurrentInstance()
          .getPartialPageContext().getPartialTargets(); iter.hasNext();)
        String partialTarget = (String);

        if (partialTarget.startsWith(component.getClientId(context)))
          // ...Unless the container has a ppr registered child
          renderChildren = true;
          if (_LOG.isInfo())
  "Target found, container will render. Target: " +

    if (renderChildren)
      super.encodeChildren(context, component);

Chordiant Software Inc.

View raw message