>You mean it's quicker to iterate through ALL databases and
>compare for the dbID you're looking for yourself than it
>is to use the API to match the dbID?
No - he's now doing one search through the database list, and exiting once
he has found all of the databases. That's likely to be more efficient than
doing 4 different searches, all starting from the beginning each time.
Think of the positions of each of the 4 databases as being at indices
a,b,c, and d. So doing individual searches will require a+b+c+d
comparisons. But if you just loop through the database list till you find
all four, then you've done exactly max(a,b,c,d) comparisons. So it could
be nearly a quarter of the four-searches time, in the worst (but most
likely) case.
And the reason it is so much faster than before was that he was telling it
to return the newest version of each database - which meant that it was
doing a search through the entire database list, four times.
-David Fedor
Palm Developer Support