Improving Performance of a HGrid

Most of the pages in OAF which contain HGrid face performance issue. This is mainly because the view link query gets executed multiple times recursively. So depending on the complexity of the view link query, the performance of the page gets deteriorated. Hence this post is intended to provide some tips learnt to improve the performance of a HGrid. Request the viewers to add their experiences as well.

1. Use GTT : Depending on the complexity on the query, u may use Global Temperory Table(s) to populate the entire hierarchical data so that the base tables will not be touched every time the query is re-executed.

2. setChildPresentVOAttr : Normally, when a hgrid is rendered, it has to show a + symbol (expand icon) infront of every node which has children. To do this, the detail VO query has to be re-executed in order to check whether a particular node has children or not. This reduces the performance. Inorder to skip this, we can directly include an additional attribute in the Master VO which returns ‘Y’ if that node has children and ‘N’ if it has no children. Then we can programmatically set this view attribute on childNode of HGrid so that detail query need not be executed again and again to check the existence of child nodes..

sample code :    

    OATreeChildBean childBean = (OATreeChildBean)webBean.findChildRecursive(“childNode1”);
    childBean.setChildPresentVOAttr(“HasChildren”); //HasChildren is the Master VO attribute which returns ‘Y’ or ‘N’

This entry was posted in OAF. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s