Top Banner
Session ID: Prepared by: Performance Tuning Best Practices for ADF Applications 10398 Gavin Woods Alex Walworth
16

Performance Tuning Best Practices for ADF Applications

Jan 26, 2023

Download

Documents

Khang Minh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Performance Tuning Best Practices for ADF Applications

Session ID:

Prepared by:

Performance Tuning Best Practices for ADF Applications

10398

Gavin WoodsAlex Walworth

Page 2: Performance Tuning Best Practices for ADF Applications

Introduction

• Gavin WoodsTechnical Manager (ADF), PITSS America LLC

• Experience:– 2 years, Project Management (ADF and MAF)– 5 years, ADF Development– 2 years, WebLogic Administration

• PITSS America LLC is located in Troy, MichiganPITSS Gmbh (HQ) is located in Stuttgart, Germany

2

Page 3: Performance Tuning Best Practices for ADF Applications

Overview

• Running ADF on Mobile Devices

• User Interface Performance Tuning

• ADFBC Performance Tuning

• Miscellaneous Performance Tips

3

Page 4: Performance Tuning Best Practices for ADF Applications

Running ADF on Mobile Devices

Page 5: Performance Tuning Best Practices for ADF Applications

Enterprise Handheld Devices Today

• There are devices which MAF will not support, that are common in today’s enterprises.

For example, Symbol/Motorola Scan Guns

5

● Runs Windows Mobile 5,6● Ruggedized Scan Gun,

used in warehouses● Hard-Key Driver User

Interface Navigation● Low Computing Power

Too costly to replace with newer iOS/Android devices

Page 6: Performance Tuning Best Practices for ADF Applications

Adapting the Hand Held Device

• Don’t use a built-in internet browser like Windows Mobile IE, its too slow!

• Install a common proprietary/third party internet browser designed for handheld mobile devices (e.g. Zebra Enterprise Browser, WaveLink Industrial Browser)

– Lightweight Browser optimized to run modern-day web applications on your mobile device

– Browser should provide JavaScript APIs that integrates with device hard-keys

6

Page 7: Performance Tuning Best Practices for ADF Applications

Adapting Your ADF Application

Light ADF Faces

7

PanelGridLayoutGoButton,GoLinkOutputTextListView (9kB)

Heavy ADF Faces

PanelStretch,commandButton, commandLinkLabelTable (245kB)

Source: http://www.ateam-oracle.com/webcenter-mobile-delivery/

Page 8: Performance Tuning Best Practices for ADF Applications

User Interface Performance Tuning

Page 9: Performance Tuning Best Practices for ADF Applications

Tune your User Interface

• Use the light ADF Faces components, mentioned in slide 7

• Keep Component Id’s to a length of 4-7 characters– Limits the rendering time required by your browser

• Write JavaScript in JS libraries and reference it– Allows your browser to cache the JavaScript

• Write CSS classes in CSS files and reference it– Allows your browser to cache to CSS and limit time

spent in rendering inline CSS• Avoid writing inline CSS in the inlineStyle and

contentStyle property where possible• Use components appropriate for the use-case.

Don’t use heavy components to deliver something simple

9

Page 10: Performance Tuning Best Practices for ADF Applications

ADF-Business Component Performance Tuning

Page 11: Performance Tuning Best Practices for ADF Applications

Think about your application architecture

• For static data that will get re-used by most/all users (e.g. Menu), store it’s view object(s) in a Shared Application Module– Benefit: Saves JVM heap, saves processing time

• For labels, please use the built-in ResourceBundle and avoid DB-based labels. If you have to do them, store them in an Shared Application Module, set at Application scope.

11

Page 12: Performance Tuning Best Practices for ADF Applications

Avoid Complex Business Logic in getters of backing beans

• ADF Lifecyle will execute the getter methods for properties that reference them - and can get executed multiple times

• Recommendation: perform business logic in task flow activity or in a listener method when necessary.

12

Page 13: Performance Tuning Best Practices for ADF Applications

Avoid complex business logic data modifications in single server calls

Example: Developer programs the app to complete large amounts of business logic, amounting to minutes of processing time

• Don’t make users wait for long processes

• Utilize threading and notify the user to check later, notify when completed (e.g. email, etc..)

• Writing such business logic in PL/SQL is recommended, avoid ADFBC all together - if your developers are PL/SQL savvy

13

Page 14: Performance Tuning Best Practices for ADF Applications

Take care of the simple things

• When building a View Object, use Entity Objects only when necessary. – Don’t create a bunch of Entity Objects and reference

them in a View Object, if you’re not going to do DML operations

• Ensure the Framework envokes View Object queries, prevent programmatic execution

• If using AF:Table/ListView tune your view object’s to fetch batches of rows it needs to display at one time. Avoid setting a fetch for every row.

• Avoid Looping through view object rows programmatically

14

Page 15: Performance Tuning Best Practices for ADF Applications

Miscellaneous Performance Tips

Page 16: Performance Tuning Best Practices for ADF Applications

Use the ADFLogger, please

• Stop using System.out.println• Stop using printStackTraces

• Use ADFLogger and it’s varying levels of grainularity (INFO, WARNING, SEVERE, etc..)

16