Showing posts with label Tuning. Show all posts
Showing posts with label Tuning. Show all posts

Sunday, July 15, 2018

JDev/ADF sample - ADF Postback Payload Size Optimization

  • ADF Postback Payload Size Optimization. Recently I came across property called oracle.adf.view.rich.POSTBACK_PAYLOAD_TYPE. This property helps to optimize postback payload size. It is described in ADF Faces configuration section - A.2.3.16 Postback Payload Size Optimization. ADF partial request is executing HTTP post with values from all fields included. When postback property is set to dirty, it will include into HTTP post only changed values. As result - server will get only changed attributes, potentially this can reduce server time processing and make HTTP request size smaller. This especially can be important for large forms, with many fields.
    Download - GitHub

Monday, January 29, 2018

JDev/ADF sample - Avoid Blind SQL Call from ADF Task Flow Method

  • Avoid Blind SQL Call from ADF Task Flow Method. Keep an eye open on ADF Task Flow Method Call activities where methods from ADF Bindings are called. JDEV 12c sets deferred refresh for ADF binding iterators related to TF Method Call activities and this causing blind SQL to be executed. Blind SQL - query without bind variables.
    Download - ADFTFCallBindingApp.zip

Friday, November 10, 2017

JDev/ADF sample - ADF Performance Story - This Time Developer Was Wrong

  • ADF Performance Story - This Time Developer Was Wrong. ADF is fast. If ADF application is slow, most likely this is related to development mistakes. I would like to tell you one story, based on my ADF tuning experience. Problem description: ADF application runs fast in DEV, when DB size is small. Same application runs slow in TEST/PROD, when DB size is large. Question - what is slow. Answer - slow means forms are loading slow. Ok, lets go to the story.
    Download - ADFRangeSizeApp.zip

Sunday, June 25, 2017

JDev/ADF sample - ADF BC Attribute - Collection Storage Mode Property

  • ADF BC Attribute - Collection Storage Mode Property. I would like to describe one interesting property for ADF BC attribute. This property is called Storage. There are two possible values: row (default) and collection. By default attribute value is saved in row storage, but alternatively it can be saved in collection storage. ADF BC implements collection storage using map which comes from session scope. This allows to keep value even between ADF BC requests, this is ideal for transient attributes.
    Download - ADFBCCheckboxApp.zip

Wednesday, December 21, 2016

JDev/ADF sample - Skip LOV Validation for ADF BC Bulk Insert

  • Skip LOV Validation for ADF BC Bulk Insert. This post is about ADF BC LOV. I will describe how you could optimize bulk insert of new rows into VO, when some of the attributes are assigned with LOVs. By default ADF would validate new row attribute value through LOV (LOV Validation and Programmatic Row Insert Performance) for each new row. This will lead to bad performance, especially if you insert a set of new rows programmatically - there will be multiple SQL queries executed to check if LOV attribute value exists.
    Download - LOVValidationBulkInsertApp.zip

Saturday, June 18, 2016

JDev/ADF sample - ADF BC Range Paging and ADF UI Table Pagination Use Case

  • ADF BC Range Paging and ADF UI Table Pagination Use Case. ADF UI table pagination and ADF BC range paging sounds like a perfect combination. But to make it work perfect, a bit of extra effort is required. In the case of search/edit implementation, it can't remember updated record when navigating back to search screen (VO runs with Range Paging and UI table is displayed with pagination). I will explain how to solve it and show how to keep UI table displaying current page and prevent jumping to the first page.
    Download - SearchEditApp.zip

Tuesday, April 26, 2016

JDev/ADF sample - Optimize ADF HTTP Response Size with ChangeEventPolicy

  • Optimize ADF HTTP Response Size with ChangeEventPolicy. You should read this post, if you are looking how to reduce ADF HTTP response size. This can be important for ADF application performance tuning, to improve PPR request response time. By default in ADF 12.2.1, iterator is assigned with ChangeEventPolicy = ppr. This works great for UI component bindings refresh, no need to set individual partial triggers. On other side, this generates extra content in ADF HTTP response and eventually increases response size. I would recommend to use ChangeEventPolicy = ppr, only when its really needed - dynamic forms, with unknown refresh dependencies. Otherwise set ChangeEventPolicy = none, to generate smaller response.
    Download - ChangeEventPolicyPPRApp.zip

Sunday, April 10, 2016

JDev/ADF sample - Monitoring ADF 12c Client Request Time with Click History

  • Monitoring ADF 12c Client Request Time with Click History. You must be excited to read this post, I will describe one very useful feature, available in ADF 12c. This feature - Click History. You can follow steps described by Duncan Mills, to enable and read click history data in server log. There is one more option available - we can read click history data from ADF request (captured by filter class) and log it in custom way (for later analysis). Click history gives such information as client request start/end time (you can calculate client request duration), component client ID, component type, action event type, etc. All this is useful to understand application performance perceived by the client.
    Download - DashboardApp.zip

Wednesday, March 30, 2016

JDev/ADF sample - Change ADF BC Data Update Locking with FOR UPDATE WAIT

  • Change ADF BC Data Update Locking with FOR UPDATE WAIT. Each time when data is changed and updated through ADF BC, before posting changes to DB, SQL query with FOR UPDATE NOWAIT is generated and executed. In case if other process locks row to be updated, or another user in the same moment is updating it, error will be generated and update will be stopped. There might be use cases, when you would like to wait for certain period of time, until row will be unlocked and then commit row changes. This is especially true, if 3rd party (PL/SQL) process is updating rows and you have defined change indicator attribute in ADF BC (see my previous post - ADF BC Version Number and Change Indicator to Track Changed Rows).
    Download - LockUpdateApp.zip

Thursday, September 17, 2015

JDev/ADF sample - Use Case of Auto Re-Execute Functionality in ADF BC

  • Use Case of Auto Re-Execute Functionality in ADF BC. There are use cases, when data in DB is changed by background processes and we would like to display to the user latest data available. Very common implementation for this use case is to re-execute ADF iterator and VO each time when Task Flow or UI screen is accessed. Obviously this works, but performance would suffer - usually there is no need to re-fetch data each time, it must be re-fetched only when changes are detected in DB. ADF BC provides out of the box such functionality - it can detect changes in DB and re-execute VO through Database Change Notification. Make sure to grant CHANGE NOTIFICATION system privilege to the data source user.
    Download - ADFAltaApp_v9.zip

Thursday, July 30, 2015

JDev/ADF sample - Using Shared AM to Cache and Display Table Data

  • Using Shared AM to Cache and Display Table Data. This post is based on Steve Muench sample Nr. 156. In my personal opinion, ADF samples implemented by Steve Muench still remain one of the best source of examples and solutions for various ADF use cases. Sample Nr. 156 describes how to use Shared AM to display cached data in UI table. Typically Shared AM's are used to implement cached LOV's (session or application scope). But it could go beyond LOV, based on the use case we could display cached data in the table or form. I have tested this approach with 12c and it works fine.
    Download - ADFBCSharedSessionLOVApp.zip

Thursday, July 16, 2015

JDev/ADF sample - Auto Refresh for ADF BC Cached LOV

    Download - ADFBCSharedSessionLOVApp.zip

Saturday, July 11, 2015

JDev/ADF sample - ADF BC Session Cached LOV - Understanding Expire Time

  • ADF BC Session Cached LOV - Understanding Expire Time. ADF BC offers LOV caching feature. There are two caching levels - application and session. With application level enabled, it makes LOV rows available for all users. On contrary for session level LOVs, data is cached for single session only. In this post I will focus on session level LOV's and I'm going to explain when cached data expires and is re-fetched.
    Download - ADFBCSharedSessionLOVApp.zip

Thursday, June 11, 2015

JDev/ADF sample - How To Record ADF Client Side Request Performance Time

    Download - ADFAltaApp_v6.zip

Sunday, May 31, 2015

JDev/ADF sample - Load More Scroll Policy for ADF 12c Table and Range Paging

    Download - ADFTableLoadApp.zip

Saturday, April 12, 2014

JDev/ADF sample - ADF Query Design Revisited with ADF 12c Panel Drawer

    Download - ADFQueryPreviewApp.zip

Thursday, March 6, 2014

JDev/ADF sample - Why You Don't Want to Code Validation in Before Commit

  • Why You Don't Want to Code Validation in Before Commit. You should know by now - there are many things possible in ADF, but it doesn't mean every solution is right, even if it works. One example of such case - coding validation rules in beforeCommit method. This method is invoked after all changes are posted and ADF BC assumes data is valid, if we throw later validation error from beforeCommit - ADF BC state remains unchanged and changed data is not submitted again. There is a workaround to set jbo.txn.handleafterpostexc=true and to force in memory passivation snapshot with subsequent activation on validation error - however, this is a big performance hit. Every time, where there will be validation error - rollback will be executed and entire AM with all VO instances will be re-activated (SQL re-executed and data re-fetched). Today post is about bad practice, to demonstrate why you should not code validation in beforeCommit method.
    Download - ADFHandleAfterPostApp.zip

Thursday, February 20, 2014

JDev/ADF sample - ADF BC Performance - View Object Instance Lazy Activation

  • ADF BC Performance - View Object Instance Lazy Activation. ADF BC is a great framework to manage data, but one thing it does really smart - ADF BC View Object instance lazy activation. You must know by now - passivation/activation events in ADF BC are relatively expensive in terms of performance. Especially expensive is activation event, as during this event View Object instance is re-constructed and data is re-fetched. However, it is not as bad as it sounds - it doesn't activate all View Object instances from Application Module together. Only View Object instances referenced from current Page Definition are activated. This means, if user was working with 10 screens, before passivation event happened - during activation event, only View Object instances from current screen will be activated. View Object instances from other screens will be activated, when actual screen will be accessed. Good news - you don't need to tune anything for this, this is how it works by default.
    Download - AMStatisticsApp_v2.zip

Monday, January 27, 2014

JDev/ADF sample - AMStatistics - Adding Custom Statistics to ADF BC

  • AMStatistics - Adding Custom Statistics to ADF BC. ADF BC Application Module provides standard class called AMStatistics. This class gives you info about AM creation time as for example, Web Session ID assigned to the current session, etc. What is cool about this class - it is not limited with out of the box statics only, it allows to add your custom statistics. I will describe use case of tracking activation timestamp for the AM and keeping it custom AMStatistics variable.
    Download - AMStatisticsApp.zip

Saturday, January 11, 2014

JDev/ADF sample - ADF BC Application Module Instance Timeout and Web Session Timeout Dependency

  • ADF BC Application Module Instance Timeout and Web Session Timeout Dependency. What happens with AM instance, when Web session times out? I would like to answer this question. To find an answer, I have developed sample application with special settings for AM configuration. This is important to understand, because we should try to avoid frequent AM passivations, same as frequent AM activations. Passivations consumes server resources and delays request processing for current active users.
    Download - AMInstanceTimeoutApp.zip