Native Compilation of Apex code

Has anyone tried natively compiling all of the Apex packages, procedures and functions?
For example, to natively compile WWV_FLOW (with DBA privileges):
<ul>
<li>ALTER SESSION SET PLSQL_CODE_TYPE='NATIVE' ;</li>
<li>ALTER PACKAGE FLOWS_030100.WWW_FLOW COMPILE ;</li>
</ul>
We've recently done just this on a test installation (Apex 3.1, Oracle 10g) and have found that Apex runs significantly faster. Before we consider implementing in production, I was wondering if anyone has also tried this and whether they came across any problems?
Kevan
Edited by: KGelling2 on Oct 30, 2008 2:24 PM

Hello,
I've only ever come across one other person who has mentioned doing that, he mentioned that he got performance improvements too although didn't qualify them. What sort of improvements are you seeing?
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

Similar Messages

  • Compile a Java code to a native machine code

    Hi Everyone,
    What tool do I need to compile a Java code to a native machine code? Is there any free tool?
    Cecilia

    google.com is a good place to start

  • Please explian what is native compilation and how to use it

    hi all.
    please explian what is native compilation and how to use it
    regards

    It's explained well in the PL/SQL User's Guide and Reference
    Compiling PL/SQL Code for Native Execution
    http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/12_tune.htm#48419

  • PL/SQL Native Compilation - not working!

    I'm at my wits end here.
    Oracle 10.2.0.3 under Windows Server 2003 (i know, i know...) and a whole lot of procedural PL/SQL that I think could benefit from native compilation. I've done this on Linux/unix environments a few times but never imagined it would be quite so painful under Windows.
    Ended up using Visual C++ 2003 (7.1 compiler) which compiled everything. MinGW wouldn't compile everything, lots of undefined references to _setjmp and others, but that's a different subject.
    Anyway, after two days of dealing with issues, I finally get things to compile. The .dll is created. The init parameters say we're native. The test procedure is recompiled as native, and verified in dba_plsql_object_settings. As far as I am aware, native compilation is present and working. But when I run the thing.... performance is the same. Recompile as interpreted... same. Recompile as native again... same. This is demo code here, simple loop, the kind of thing that is 10x faster on my Linux environment.
    Basically the behavior is as though native compilation just isn't working... the DLL isn't working. Funny thing is that it -was- working earlier with the same code... right up until I bounced the box. Now I am dead in the water with no log file, no trace, nothing... just a non-functional native compilation feature.
    Any ideas? Anyone else struggle with this?
    Bob

    SELECT name, value
    FROM gv$parameter
    WHERE name LIKE '%code%';
    Did you do this before you bounced the database?
    ALTER SYSTEM SET plsql_compiler_flags = 'NATIVE';
    or
    ALTER SESSION SET plsql_compiler_flags = 'NATIVE';when perhaps you should have done this:
    ALTER SYSTEM SET plsql_code_type = 'NATIVE' SCOPE=BOTH;

  • Native compilation and the ROUND function

    Native Compilation Advisor lists the built-in ROUND function as not supported for natively compiled stored procedures.  Is there a suggested workaround?

    oracle by oracle  wrote:
    I am trying to test performance of one package and there is only one procedure wich uses just instr and substr internal functions ( I am working with varchar2).
    I am having the folowing results: native compilation is twice worst than inetrpreted. What may be the reason?
    P.S. I did ALTER SYSTEM FLUSH SHARED_POOL;Yuo should take this into account that the Native compilation is not supposed to make the code always go faster. If I remember correctly, the maximum benefit that Oracle benchmarked for it was about 30% only and taht too, if the code has lots of computational code rather than queries. If your package contains lots of this kind of code. than may be the Native compilation may be faster than the other but it doesn't come with any guarantee like this.
    Have a read about it from here,
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/tuning.htm#sthref2278
    HTH
    Aman....

  • Does native compiling improve application performance ?

    Hi,
    I've got familiar with Excelsior Native Compiler since a week ago. They claim on their website that compiling Java classes directly to native code (machine code) will improve the performance of the application. However, JAlbum (http://jalbum.net) says that its JAR files of the application run "basically at the same speed" compared to the native compiled one for windows.
    Does really compiling Java classes to native code improve performance? I'm not talking about the startup speed, but the whole application performance.
    Thanks...

    Youve really been spreading that article aroundthis
    morning, George, lol.
    It was actually a really good read this morning.
    Thanks for posting it.I know! just realized that's about the 3rd or 4th
    time I've posted it today. just a coincidence, thoughcan't promote that book enough though. Should be required reading (just like Effective Java).

  • Will native compiling improve performance?

    Hi,
    I've got familiar with Excelsior Native Compiler since a week ago. They claim on their website that compiling Java classes to native code (machine code) will improve the performance of the application. However, JAlbum (http://jalbum.net) says that its JAR files of the application run "basically at the same speed" compared to the native compiled one for windows.
    Will really compiling Java classes to native code improve performance? I'm not talking about the startup speed, I mean the whole application performance.
    Thanks...

    depends on what the app is doing
    many things in java run as fast as native code, especially if you're using a later version of java
    i guess there's one way to find out :-)

  • How much can a native compiler improve performance of a java application?

    Hello,
    we have a customer with low-end machines who complains very much about the
    starting time of an application of us. I dont't know the exact configuration
    of the clients but i think the bad perfrmance is because the client has too
    few memory and has to swap when the jvm starts.
    Could a native compiler like Excelsior JET be a solution or would the
    imporvement be only marginal?
    Anyone who has experience in this topic?
    Thank you in advance!

    Could a native compiler like Excelsior JET be a solution or would the
    imporvement be only marginal?Excelsior JET only packages up the class files and a JRE into a big blob so that it looks like a single executable. It doesn't actually generate native code for your classes.
    There are some limited pure-native compilers (e.g. GCJ - the GNU compiler for Java). Because you also need native-compiled libraries, and those are quite incomplete, only certain basic programs can be compiled down to native form without some major tweaking today.
    As to whether it'll improve your performance or not: if your program is computationally intensive (does lots of floating-point math, or other CPU-intensive algorithms), it may improve. If it's I/O, network or database bound, you'll see very little improvement, if any. If it's graphics-bound, you may see some improvement, though the native Swing support with GCJ is limited at this time.
    Even with long computationally-intensive programs, you may or may not see an improvement. If you use the server VM (java -server ...), then it does similar things behind your back (optimizing compiles), so that eventually your program speeds up a fair amount (though not to pure-native speeds).

  • Forcing/guiding jit to compile sections of code?

    Anyone knows any reliable way to guide j2me jit compilers to compile
    sections of code?
    Let me explain...
    My app has spends 75% of time in a tiny part of code. As far as
    computational complexity is concern, it algorithm optimal (pls, don't
    challenge my background), as far as implementation/peephole optimization is concern, it is already quite good, though can be better,
    but won't be enough to explain the difference below. The code
    processes 6k of data (a byte array.) Caching difference cannot
    explain the difference in times below either.
    Somehow, initial testing suggested that the jit compiler on my
    Nokia N70 (Symbian on ARM) was so unpredictable on
    my benchmarks that I can only conclude its occationally misses
    my critical code, i.e., some tries are interpreted, some are
    compiled. The difference is consistently like 40s vs 300s, which is
    approx the difference between (well) interpreted and native code.
    There is no bug in my code.
    So, I tried to force run the critical function the first thing
    after startup, I THOUGHT it workd for a while, somehow it doesn't
    work anymore.
    Tricks anyone?
    Cheers...

    Sadly there is really nothing you dan do here. The Jit works on the background, and the application does not have any control over it.
    You might try a System.gc() before you start your algo to make sure the vm cleans up a bit, but I don't think it will help you very much...

  • Native Compiling error

    We are getting the following error when trying to compile a procedure as NATIVE:
    PLS-00923: native compilation failed: make:spdtexmk:?
    We set the following parameters:
    plsql_native_make_utility     /usr/bin/make
    plsql_native_make_file_name /local/bin/oracle/9.2/plsql/spnc_makefile.mk
    plsql_native_library_dir /local/bin/oracle/9.2/plsql/lib/
    and plsql_compiler_flags=native
    The make utility can be envoked and all utilities used in spnc_makefile.mk (ld, nm, cc) can be envoked as well.
    All directories exist.
    We are running 9.2.0.5 64bit on AIX5.2
    Anyone?

    The basic problem is that Borland C and VC++ define some things differently, and the header files are geared to VC++.
    The way I got around this is to make some adjustments to my C code to impose the Borland definitions in place of the VC++ definitions. I do this creating a .h file that
    o Includes my definitions.
    o Includes jni.h
    I then #include my .h file instead of directly including jni.h. That way, I don't need to change jni.h or jni.md.h
    Here is roughly what it looks like. (Can't give you the exact code - the files are proprietary and include a lot not-relevant stuff.)
    If you run into troubles with some files compiling, and some not, then I suggest you move some of the macro redefinitions to a .cpp file, and just # include that into your own .cpp file.
    (file shell.h)
    #ifndef ShellH
    #define ShellH
    // This file is used to make Borland-specific settings.
    // Normal kinds of stuff.
    #define WIN32
    #define HAS_BOOL
    // Suppress dll code.
    #ifdef jdecl
    #undef jdecl
    #endif
    #define jdecl
    // Borland has seen fit to specially-define toString();
    #ifdef toString
    #undef toString
    #endif
    #define toString jToString
    // Define functions and constants per Borland (vs Microsoft).
    #define _chdir chdir
    #define _cwd cwd
    //#define _getcwd getcwd
    #define _getpid getpid
    //#define _stat stat
    #define SHDENYWR SH_DENYWR
    #include "jni.h"
    #endif

  • Native compiler...

    Do any of you know a Java compiler that would turn a java file into native mac code? ( or maybe a cheap one for PC )

    of course, the compiler that comes with java is a
    Meta-Compiler and a true compiler could make my app
    run two or three times faster...Correct, it could. But you might also find that you would like to use a library which will not compile into machine code.
    So if all you do is trival programs, they will run faster. However, non trival programs will not compile.
    My suggestion is to worry about perform when it is a problem, then fix it. My guess is that you won't have a problem because most real programs spnd little CPU time running Java code and spend most time in native code or the kernel.

  • PLSQL Native Compilation - PGA dependency

    Hi Gurus,
    Need your valuable inputs on Native Compilation enabled instance. Documentation says that natively compiled plsql code is loaded to PGA instead of SGA. Can somebody throw some light in direction of new additional size requirements for pga_aggregate_target. Will the old PGT value will do just fine.
    the main reason for asking above queustion is
    We are seeing following issue after enabling native compilation
    Cause: FDPSTP failed due to ORA-04030: out of process memory when trying to allocate 16408 bytes (koh-kghu sessi,koc koctx)
    ORA-06512: at "APPS.MSC_CL_COLLECTION", line 3504
    this doesnt occur, if we disable native compilation
    what does koh-kghu sessi,koc koctx actually mean ?
    vasu

    http://technet.oracle.com/docs/products/oracle9i/doc_library/901_doc/appdev.901/a89856/12_tune.htm#48419

  • Getting an strange error in "PluginPrefix.pch" while compiling a plugin code with InDesign CS4 SDK.

    Hi everybody,
    Currently trying to compile/build the existing Plugin code (C++) with InDesign CS4 SDK on my Mac OS X 10.5 machine but getting following strange errors.
      /Volumes/MAC Extended/Inbetween Extended/Visual Studio/Adobe InDesign CS4 SDK/source/precomp/gcc/PluginPrefix.pch:26:27: error: MemoryStatics.h: No such file or directory
      /Volumes/MAC Extended/Inbetween Extended/Visual Studio/Adobe InDesign CS4 SDK/source/precomp/gcc/PluginPrefix.pch:39:30: error: PluginBuildFlags.h: No such file or directory
      /Volumes/MAC Extended/Inbetween Extended/Visual Studio/Adobe InDesign CS4 SDK/source/precomp/gcc/PluginPrefix.pch:40:28: error: AnsiBasedTypes.h: No such file or directory
      /Volumes/MAC Extended/Inbetween Extended/Visual Studio/Adobe InDesign CS4 SDK/source/precomp/gcc/PluginPrefix.pch:41:26: error: ShukHeaders.cp: No such file or directory
    Though above mentioned files are present at the following directory
    /Volumes/../../../Adobe InDesign CS4 SDK/source/precomp/common/
    Note : However initially I did not find “MemoryStatics.h” and “AnsiBasedTypes.h” files in the installed SDK directory. I have downloaded them from the net and copied those into the above mentioned directory.
    I am not much familiar with Mac OS environment and compiling/building C++ code with Xcode. Can anyone help me to resolve this issue (might be very trivial and related to Xcode project configuration) ?

    Thanks for the quick response,
    Yes, current build settings include path shortcuts as mentioned below and it also contains “$(CS_SDK_PATH)/source/public/includes” path in HEADER_SEARCH_PATHS settings.  But still I am getting the same error: MemoryStatics.h: No such file or directory
    CS_SDK_PATH= /Volumes/MAC Extended/Inbetween Extended/Visual Studio/Adobe InDesign CS4 SDK
    CS_SDK_PRJ_PATH=/Volumes/MAC Extended/Inbetween Extended/Visual Studio/InBetweenDev/Projects/InBetweenCS/IBClientPluginCS3/prjCS4/mac
    Just for clarification : my Plugin code /project files are not inside the InDesign SDK (build/mac/prj). All the plugin project is outside of the InDesign SDK directory. Thus above mentioned CS_SDK_PATH and CS_SDK_PRJ_PATH are completely different.
    Is it expected that the plugin code/project files should be inside the InDesign SDK/build/mac/prj  directory only ? or is it okay if we put it in the completely another directory structure and modify the  SDK_PRJ_PATH accordingly (as in my case) ?
    Please let me know if you want me to elaborate the situation further.

  • A database error occurred. Source: Microsoft SQL Server Native Client 10.0 Code: 1205 occurred

    Hi
    i am getting these errors in sharepoint server event viewer, and when i see the sql server the log files disk is full memory only some mbs left out of 1 TB
    Log Name:      Application
    Source:        Microsoft-SharePoint Products-SharePoint Server Search
    Date:          7/12/2014 9:56:04 PM
    Event ID:      57
    Task Category: Search service
    Level:         Warning
    Keywords:     
    User:          XYZ\svc-mc-sps3eServsear
    Computer:      SPFIND01.xyz.gov.local
    Description:
    A database error occurred. Source: Microsoft SQL Server Native Client 10.0 Code: 1205 occurred 1 time(s) Description: Transaction (Process ID 193) was deadlocked on lock
    resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    Context: Application 'XYZSP_SearchApp'
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-SharePoint Products-SharePoint Server Search" Guid="{C8263AFE-83A5-448C-878C-1E5F5D1C4252}" />
        <EventID>57</EventID>
        <Version>14</Version>
        <Level>3</Level>
        <Task>136</Task>
        <Opcode>0</Opcode>
        <Keywords>0x4000000000000000</Keywords>
        <TimeCreated SystemTime="2014-07-12T18:56:04.665684900Z" />
        <EventRecordID>225666</EventRecordID>
        <Correlation />
        <Execution ProcessID="3408" ThreadID="2932" />
        <Channel>Application</Channel>
        <Computer>SPFIND01.xyz.gov.local</Computer>
        <Security UserID="S-1-5-21-1537596049-1164153464-4201862467-47315" />
      </System>
      <EventData>
        <Data Name="string0">Microsoft SQL Server Native Client 10.0</Data>
        <Data Name="string1">1205</Data>
        <Data Name="string2">1</Data>
        <Data Name="string3">Transaction (Process ID 193) was deadlocked on lock resources with another process and has been chosen as the deadlock
    victim. Rerun the transaction.</Data>
        <Data Name="string4">
    Context: Application 'XYZSP_SearchApp'</Data>
      </EventData>
    </Event>
    A database error occurred. Source: Microsoft SQL Server Native Client 10.0 Code: 9002 occurred 1 time(s) Description: The transaction log for database 'tempdb' is full due to 'ACTIVE_TRANSACTION'.
    Context: Application 'XYZSP_SearchApp'
    adil

    If you've run out of disk space for your SQL databases then of course you'll get errors. Fix SQL then look to see if you're still getting errors.

  • How to compile the source code?

    Hello,
    I have got the source code and want to custom my nosql db.
    how can I compile the source code?
    thank you!

    You will have to apply some workarounds to achieve your goal, but they are not too bad.
    One problem is that the sources for the Admin Console web application are missing from the distribution. You can build a kvstore.jar that lacks the web application but is functional in every other way. If you need to have the web application in your build, we can discuss that separately.
    You will need to download the hadoop core jar file from http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-core/0.20.2/hadoop-core-0.20.2.jar .
    Place it in the lib directory of the distribution.
    I've appended to this message a context-style diff to show the changes that are needed in build.xml. You can apply these changes by hand, or use a diff-applying program such as "patch". The diff is small -- only three lines are changed.
    With these changes in place, issue the command "ant jar", which should produce the file dist/lib/kvstore.jar. This jar file has dependencies such that it will not work correctly unless it resides in the same directory as the other jars in the distribution. Therefore you should move dist/lib/kvstore.jar to lib/kvstore.jar before you try to run with it.
    This is certainly harder than it needs to be. We'll consider making this easier to do in a future release.
    Let me know how it goes!
    *** build.xml.~1~     2011-12-14 15:11:06.000000000 -0500
    --- build.xml     2012-04-19 09:44:19.649000428 -0400
    *** 282,292 ****
        <!-- ============================================================ -->
        <target name="compile" depends="compile-src,
    !                       compile-webapp,
                            compile-examples,
                            compile-test"/>
    !   <target name="compile-src" depends="dep-dirs, update-external-libraries">
          <javac
             srcdir="${srcdir}"
             destdir="${destdir}"
    --- 282,292 ----
        <!-- ============================================================ -->
        <target name="compile" depends="compile-src,
                            compile-examples,
                            compile-test"/>
    !   <target name="compile-src" depends="dep-dirs">
          <javac
             srcdir="${srcdir}"
             destdir="${destdir}"
    *** 402,408 ****
          </java>
        </target>
    !   <target name="jar" depends="compile-src, compile-webapp-gwtc, je-version, kvclientjar">
          <delete failonerror="false" file="${jarfile}" />
          <jar jarfile="${jarfile}">
           <fileset refid="jarclasses"/>
    --- 402,408 ----
          </java>
        </target>
    !   <target name="jar" depends="compile-src, je-version, kvclientjar">
          <delete failonerror="false" file="${jarfile}" />
          <jar jarfile="${jarfile}">
           <fileset refid="jarclasses"/>Edited by: Guy Hillyer, Oracle on Apr 19, 2012 9:57 AM

Maybe you are looking for

  • Office 2013 (local) vs. Office 365 (cloud)

    For the moment we are primarily interested in using the main Office 2103 apps from the user Desktops. (We do not want users to even store documents on the cloud) 1. Is there a URL indicating the feature differences between local and cloud Office 2013

  • Deleting a single item list in dropdown choices

    Perhaps I am just not seeing the obvious simple solution but how do I provide a user the option to simply delete his choice in a dropdown selection. I have added a clear form button to wipe all form data, but how do I allow a user once he/she has sel

  • Problem with CN41 Info Profile

    Hi experts, i have added two customer specific fields in STRUCR structure. In CJ20n its displaying properly.( Added those fields in AFVU. Designed in the screen also) i have created  PS Info profile with the same two fields. its showing zero after ex

  • Cmd command "Tasklist" not found.

    I'm running Windows 8.1 and I've been having issues playing League of Legends, so I sent a support ticket to Riot Games, and they told me a list of information that I needed to retrieve to help them identify the problem. One of the steps they asked m

  • Amount & Currency MD in 1 column in BEx

    From R/3, they are coming as two separate fields in different curreny units. Annual Salary and Currency are both separate display attributes of employee.  They are part of employee master data. In BEx, I would like to see Annual Salary and Currency i