4 adjusting emulator performance, Adjusting emulator performance – Sun Microsystems J2ME User Manual

Page 46

Advertising
background image

34

J2ME Wireless Toolkit User’s Guide • October 2004

The toolkit enables you to choose a different location for the storage files, and you
can limit the size of the storage. This is useful if you wish to test your application’s
behavior when a small amount of persistent storage is available.

To adjust the persistent storage settings, choose Edit > Preferences... and click on
the Storage tab. Enter the name of the directory you wish to use for persistent
storage. You can only enter a relative path, and the directory you specify is created
in the {toolkit}

\appdb

directory.

If you wish, you can enter a limit in kilobytes for the size of the persistent storage.
Bear in mind that the storage implementation has some overhead in addition to the
space your application uses. For example, if you enter 8 kB for the persistent
storage size, 8192 bytes is available for both your application data and the storage
overhead.

If you wish to erase the persistent storage of the emulator, choose File > Utilities...
from the KToolbar menu. Click on the Clean Database button to wipe the
persistent storage clean.

4.3.4

Adjusting Emulator Performance

The emulator uses many of the resources of your desktop computer, including its
display and network connection. Compared to the desktop-based emulator, a real
MIDP device usually has a slower processor, less memory, and a slower network
connection, and might have a different type of display.

The J2ME Wireless Toolkit allows you to simulate the constrained environment of a
real device. Although the emulator does not represent a real device, adjusting the
performance settings gives you useful information about how your application
performs under varying runtime conditions.

Choose Edit > Preferences... and click on the Performance tab.

Advertising