TNS/E Native Application Conversion Guide

TNS/E Native Application Conversion Guide529659-003
2-1
2
Developing a Conversion Strategy
This section describes the decisions you must make to convert a program to native
mode, including:
Determining Which Programs to Convert
Preparing Programs for Conversion on page 2-2
Planning System Resources on page 2-2
Maintaining Common Source Code for TNS and TNS/E Native Compilers on
page 2-3
Determining Optimization Levels on page 2-5
Determining Data Alignment on page 2-6
Tuning the Performance of Native Programs on page 2-8
Determining Which Programs to Convert
To determine which TNS programs to convert to native mode, follow these guidelines:
If CPU performance is not an issue (for example, the program is I/O-bound), you
gain some but not much measurable performance by native-compiling the program
instead of accelerating the program with OCA. Where CPU performance is an
issue, the great advantage to native-compiling is that programs usually run
significantly faster.
If your program consists mainly of calls on system code, you do not gain much
additional performance by native-compiling the program itself. Much of the
performance-critical and heavily-used HP system code has been native-compiled.
If your program uses large amounts of memory, is very recursive, or makes many
function calls with a large number of local variables, you often gain additional
performance by native compiling the program instead of accelerating the program.
The native process architecture supports a much larger and more efficient process
heap and stack.
If you want to compile and link your program on a PC using ETK, you must convert
to native mode.
The OSS environment on TNS/E systems does not support TNS development and
execution. Therefore, if you are migrating a OSS TNS application to a TNS/E
system, you must convert the application to native mode. You can either convert
the application to native mode on the TNS/R system, and then migrate the
converted application to the TNS/E system (in most cases, a simple process) or
you can migrate and convert the application in a single step as described in this
manual.