I believe that the database header is 'smarter' and will actually use
multiple chinks, but once you reach this point thinks 'really' slow down.
You can certainly have more than 10K records (I have done it)

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Bob Ebert
Sent: Friday, April 21, 2000 07:51
To: Palm Developer Forum
Cc: Palm Developer Forum
Subject: RE: Installing a PDB file takes a lot of time

At 7:33 PM +0200 20-04-00, Steve Austin wrote:
>Ok, call it magic, but what is it really. Is the Handheld Manager
>overrunning a buffer and reallocating a large chunk of memory?

Exactly.

There is a database header, which is essentially a big array with the
handles of each record.  As you add records, this array must grow.  When it
grows too big for the chunk it's in, the chunk must be resized.  Resizing a
really large chunk can take a long time, because you will probably have to
compact the heap to make room.

14000 records, at 8 bytes per record (10 bytes for resources) is 109K.
That's a really large chunk.  Hmmm... actually, a database this large
should be impossible, because you've gone over the 64K limit.  It looks
like you should not be able to have more than about 8100 records in a
database.  Once you hit that number, DmNewRecord will start failing.

That could explain why this is taking so long after a while -- after the
limit is reached, then next 6000 or so record transfers will fail, which
probably takes some time to negotiate through the serial connection.

The only solution I can think of is to use fewer records, or use multiple
databases.

                                --Bob



--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to