>So I just changed it to:
>
>    if ((DmGetNextDatabaseByTypeCreator(true, &searchInfo, DatebookDBType,
>        DatebookAppID, true, &cardNo, &dbID) == 0) &&
>        !(DatebookDB = DmOpenDatabase(cardNo, dbID, mode | dmModeReadOnly)))
>        return false;
>
>It is definitely faster... I guess it is because it doesn't have to worry
>about getting the latest version of the file.

Actually this code still does look for the latest version of the file -
that's what the "true" parameter means.  Set it to false and you'll get
even more speed.

Also, the performance characteristics of these functions changed between
3.0, 3.1 and 3.2, so do try things out on each rom version to measure
accurately.  The Palm OS Emulator can provide good empirical information if
you use the profiling feature... particularly if you turn on and off
profiling programmatically.

-David Fedor
Palm Developer Support


Reply via email to