Adf performance tuning tips slideshare

4,416 views

Published on

Published in: Technology
1 Comment
5 Likes
Statistics
Notes
No Downloads
Views
Total views
4,416
On SlideShare
0
From Embeds
0
Number of Embeds
142
Actions
Shares
0
Downloads
2
Comments
1
Likes
5
Embeds 0
No embeds

No notes for slide

Adf performance tuning tips slideshare

  1. 1. ADF performance tuning tips Tune ADF Model Layer  Use Bind Variables instead of where clause in VO query.  Avoid writing more complex logic in backing beans, instead redirect/move business logic to associated AMImpl.  Use VO based on entity object , only when you are doing DML operations  This is only for Transient View objects - General -> Tuning -> Ensure to check ONLY 'No Rows' options rest all unchecked , also check ' Passivate State' option.  Close rowSetIterator in end.  Never ever use ApplicationModule Locator to get the instance of any application module anywhere in the project except in Web services project. Implement Nested application module technique if there is requirement to get instance of any application module.  Make sure to have unique/Primary key defined on every View Object.  Use Programmatic VO's ( Transient VO's) only if required.  If any ViewObject dragged onto page fragment as component, Make sure fetchSize should be #{bindings.MyView.rangeSize} - Good practice to keep fetchSize as low as possible.  Avoid storing data in Session Scope .  If there are any common LOV's being used in respective page fragments and as independent components, then define them in 'faces-config.xml' and use wherever needed instead of binding to each page fragment  Ensure not to have any member level variables at application module level. Split as much as possible to smaller application module based on functional area.  Never use getRowCount() unless it is really needed.  Use a read-only View Object if the View Object does not have to insert or update data.  Close unused rowsets.  If some data is static and used at multiple places then, cache data can be collected using a shared application module. Define in one application module and reuse using share application module.
  2. 2. Tune ADF Faces UI Layer  While using tree or table, always consider set correct fetch size( fetch size - defines the number of rows to be sent to the client in one round-trip).  While using tree or table ,use appropriate content delivery mode Possible values for this attribute are:  immediate  lazy  whenAvailable  Avoid inline usage of JavaScript/Cascading Style Sheets (CSS) whenever possible.  While using tree or table, always consider set correct fetch size( fetch size - defines the number of rows to be sent to the client in one round-trip).  Avoid binding UI components in backing beans, if used make them as transient  Minimize the Number of Application Module Data Controls.  While using tree or table use column stretching, if really required.  Use "blocking=true" for and to avoid multiple clicks on submit buttons.  If you use, af:region and the jsff page fragment files have more than 1 root component, optimize it by arranging these components with a single root component. For example, if you want your region contents to stretch, you might have one visible content component and a series of popup components, put the visible content component inside of a “center” facet of an af:panelStretchLayout and put all of those popups in the “bottom” facet but also make sure to assign bottomHeight=”0px”. If you don’t want the contents to stretch, simply wrap these components with an af:panelGroupLayout layout=”vertical”.  Remove unused items from page bindings.  Minimize use of components that provide overflow popups, e.g. af:panelAccordion, af:panelTabbed, af:toolbar, af:breadCrumbs, af:menuBar. If
  3. 3. you have to use these components, make sure that your target screen size can accommodate the content without having to invoke overflow.  Set Immediate Property to True when Appropriate.  Remove unused VOIterators on JSFF Page definitions.  Use AJAX (PPR) as much you can.  Never use normal html tag with ADF face component.  Minimize use of components that provide custom title text truncation, e.g. af:panelHeader and af:showDetailHeader. If you have to use these components, make sure that your target screen size can accommodate the title text without having to truncate.  Ensure none of Page definitions should have more than one data control if not needed. This may result in increasing number of database connections.  Avoid using a af:panelStretchLayout where topHeight, bottomHeight, startWidth, or endWidth is set to “auto”.  Don’t ignore the warnings that JDeveloper gives you.  Don’t use JSF/ADF Faces and JavaServer Pages Standard Tag Library (JSTL) tags together.  Use the "visible" and "rendered" attributes wisely.  The visible property specifies simply whether the component is to be displayed on the page, or is to be hidden.  The rendered property specifies whether the component shall exist in the client page at all.
  4. 4. Tune ADF Controller Layer  Ensure to define same scope ( Pageflow,Backingbean) for a backing bean across all .jsff , task flows and adfc-config.cml.  Reuse task flow as much you can.  Best practice to define Navigational flows in the task flows instead of using NavigationalHandler in backing bean scope to define the Navigation.  Ensure each backing bean/Manage bean should implement java.io.Serializble interface.  Keep the managed beans in the lowest possible scope. General Tips -  Use oracle.adf.share.logging. ADFLogger to log all debugging messages which gives more control on the logging part.  Preferred changes in web.xml – org.apache.myfaces.trinidad.resource.DEBUG - False oracle.adf.view.rich.CHECK_FILE_MODIFICATION - False oracle.adf.view.rich.CLIENT_STATE_METHOD - token oracle.adf.view.rich.LOGGER_LEVEL - False or remove this entry oracle.adf.view.rich.ASSERT_ENABLED - False or remove this entry

×