At 09:10 AM 8/18/2004, you wrote:
Hi, Is there anyone here who knows how much cycles of clock the processor
waste to execute the following funtions?

DmNumRecords
DmQueryRecord
DmReleaseRecord

I have a big database to work with in palm and I need to know that to know
what path I must walk, defines estrategies...

Well, the cycles aren't wasted -- they're used to perform the function you request :) The time also varied depending on the OS version and processor.


All of these are constant-time functions. Since the record index in a DB is stored in an array and the number of records is stored in the DB header, it's in O(1) operation to ask for the number of records, to get the handle for a single record, and to release the record when done.

However, you don't pair DmQueryRecord and DmReleaseRecord -- the release function is only used with DmGetRecord and DmNewRecord. You shouldn't modify a record that you've queried.


-- Ben Combee, DTS technical lead, PalmSource, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/



--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to