Java Reference
In-Depth Information
SystemAMS to delegate the operations. For example, when the developer
launches a MIDlet from the IDE, the UEI implementation connects to
the Debug Agent, which instructs the Installer to install the suite and the
SystemAMS to start the MIDlet in debug mode (see Figure 10.9).
Debug Agent
Figure 10.9 Deployment and lifecycle management functionality
Other operations such as Java applications management, System.out
print redirection, and memory profiling can all be implemented with the
same mechanism.
10.8 Performance
The most common criticism leveled at Java ME (or any version of Java for
that matter) is that it doesn't execute as fast as native code because it's
an interpreted language. But that stopped being a strong argument in the
days of Symbian OS v7, which introduced the Monty VM that came with
a Just-In-Time (JIT) compiler. The JIT selectively compiles the hot areas
of the application into ARM instructions onto a user writable RChunk
that is marked by the Kernel as containing code and is private to the VM
process only. The JIT boosts the performance significantly and provides
an improvement that can be both objectively measured and perceived by
the user.
Only the methods that execute most frequently are compiled; other
methods are interpreted by the virtual machine. For example, if an
application has a method which is called several times, at some point the
method is queued for compilation. Afterwards, whenever the Java method
is called, the dynamically ARM-compiled code is executed instead. If the
method stops being called, or other methods are being called more
frequently, then at some point the VM may decide to free up the memory
that contains the compiled code in order to use it to compile other
Java methods. Then the Java bytecode of the method is again executed
whenever the Java method is called.
Not only can application code be compiled, system classes can also
be compiled. That can be done at product build time to save the CPU
processing time that is required for compilation. For example, in CLDC-HI
HotSpot, this process is called 'system classes ROMization', and is done
during the product build by using a Win32 build of the VM which runs
the JIT module itself.
Search WWH ::

Custom Search