Patchable Constants: KListImplBufferSize

# define ECOM_PATCHDATA_KLISTIMPLBUFFERSIZE 2048

Exported from:

ECOMPATCHDATA.DLL

Defined in:

.../os/ossrv/lowlevellibsandfws/pluginfw/framework/frame/ecompatchdataconstant.cpp

Purpose:

This constant is used to define the size of the buffer that is pre-allocated on the ECOM client side to hold the list of Implementation Information records. The records are copied from the server as a result of a call to one of the REComSession::ListImplementationsL() functions.

If the result of a call to ListImplementationsL() does not fit into the initial buffer, the server stores the result and tells the client the required size. ListImplementationsL() then reallocates the buffer and makes a second call to the server to retrieve the results.

This value can be adjusted during ROM build time to suit a particular device. In general, a smaller value results in more client-server requests, while a larger value results in fewer client-server requests. Care must be taken when choosing the value. A large value, increases the temporary heap consumption by ECOM client processes, but results in faster completion of the call to ListImplementationsL() because of fewer client-server calls. System start-up can benefit from fine-tuning this value.

The default size is 2048 bytes. This value optimises performance on the Symbian test UI platform. Larger values do not result in any significant gain in performance; smaller values reduce performance.

To work out the optimum value for this constant, you need to discover the typical size of the buffer required for each call to ListImplementationsL(). To get such values, you need to enable the ECOM_TRACE macro and rebuild ECOM. After booting up the device, you will see output in the following format from the serial port:

ECOM ListImplementations request buffer size required=88
ECOM ListImplementations request buffer size required=1562

You can use this information to calculate mean and median values, which will help you to choose the optimum value for your platform.

ECom uses a customized scheme to handle patchable constants. Device creators should follow the scheme described below to set patch values:

  • Each patchable constant is represented by a macro listed in \epoc32\rom\include\ecompatchconstants.hby. The macros in the HBY file are all commented out.

  • To activate a patch macro, uncomment the line and change the example value in the line to your custom value.