Improving performance sharing reusable code

In this recipe, we will see how to share reusable code in our application to improve performance.

Getting ready

To demonstrate the performance gain by sharing reusable code, the following example is written in Java, similar to the one presented in the previous recipe.

How to do it...

The following steps will demonstrate how to share reusable code:

  1. Create a OraclePerformanceTuningCookbook directory and a chapter02 directory inside it.
  2. Open your preferred text editor.
  3. Create a class called SharedCode in the package chapter02 using the following code and save it in a file named SharedCode.java in the previously created chapter02 directory:
    package chapter02; import java.sql.*; public class SharedCode { private ...

Get Oracle Database 11gR2 Performance Tuning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.