May 30, 2013

ADF UI Performance Guidelines

  1. Remove unnecessary/unused bindings from PageDefs.
  2. Remove unnecessary fields from <>.xml.
  3. Identify and eliminate unnecessary SQLs.
  4. Use short component Ids (less than 6 chars).
  5. Cache Backing bean getters – Do not evaluate Els often.
  6. Use Conditional Activation for Taskflows.
  7. Always call manager APIs and Finders with in a transaction.
  8. Use the "immediate" attribute.
These are some cases where setting immediate to TRUE can lead to better performance.
·         The commandNavigationItem in the navigationPane can use the immediate attribute set to TRUE to avoid processing the data from the current screen while navigating to the new page.
·         If the input component value has to be validated before the other  values, immediate should be set to TRUE. In case of an error it be detected earlier in the cycle and additional processing be avoided.
  1. Use the "visible" and "rendered" attributes.
·         For better performance, consider setting the component to not rendered instead of not visible, assuming there is no client interaction with the component. Making a component not rendered can improve server performance and client response time since the component does not have client side representation.

Performance Considerations for Table and Tree Components

  1. Modify table fetch size
·         Tables have a fetch size which defines the number of rows to be sent to the client in one round-trip. To get the best performance, keep this number low while still allowing enough rows to fulfill the initial table view port. This ensures the best performance while eliminating extra server requests.

  1. Disable column stretching
·         Columns in the table and treeTable components can be stretched so that there is no unused space between the end of the last column and the edge of the table or treeTable component. This feature is turned off by default due to potential performance impacts. Turning this feature on may have a performance impact on the client rendering time, so use caution when enabling this feature with complex tables.

Performance Considerations for autoSuggest

·         autoSuggest is a feature that can be enabled for inputText, inputListOfValues, and inputComboboxListOfValues components. When the user types characters in the input field, the component displays a list of suggested items.
·         This feature performs a query in the database table to filter the results. In order to speed up database processing, a database index should be created on the column for which autosuggest is enabled. This improves the component's response times especially when the database table has a large number of rows.

Data Delivery - Lazy versus Immediate

·         Lazy delivery should be used on pages where content is not immediately visible unless the user scrolls down to it. In this case the time to deliver the visible context to the client be shorter, and the user perceives better performance.
·         Immediate delivery (contentDelivery="immediate") should be used if table data control is fast, or if it returns a small set of data. In these cases the response time be faster than using lazy delivery.

Settings for web.xml

<context-param>
                                <param-name>                org.apache.myfaces.trinidad.CLIENT_STATE_MAX_TOKENS
                                <param-value> 3
</context-param>
 <init-param>
    <param-name>jsp_timeout
    <param-value>600
</init-param>
<init-param>
                <param-name>debug_mode
    <param-value>false
</init-param>
<init-param>
    <param-name>load_description_from_tlds
    <param-value>false
</init-param>

<load-on-startup>1

May 15, 2013

SQL script to check the tablespace usage in Oracle Database.

Here is the SQL Script to check the tablespace usage of all the tablespaces in Oracle Database.
It displays in the memory usage in MBs.

SELECT Total.name "Tablespace Name",
nvl(Free_space, 0) "Free Size(MB)",
nvl(total_space-Free_space, 0) "Used Size(MB)",
total_space "Total Size(MB)"
FROM
(select tablespace_name, sum(bytes/1024/1024) free_space
from sys.dba_free_space
group by tablespace_name
) Free,
(select b.name, sum(bytes/1024/1024) total_space
from sys.v_$datafile a, sys.v_$tablespace B
where a.ts# = b.ts#
group by b.name
) Total
WHERE Free.Tablespace_name(+) = Total.name
ORDER BY Total.name;

Source: http://planetofsolutions.blogspot.in/2010/03/how-to-check-tablespace-usage-in-oracle.html