The need for speed

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Nov 27 10:09:16 CST 2007


On 27/11/07 4:28 PM, "jda" <jda at his.com> wrote:

Hi Jon,

> I'm hoping there are some tricks you can tell me that will speed up a
> function I am implementing.
> 
> Basically, it is a sync between two databases. One is on a server
> (remote) and one is local. Here is the basic schema:

You mean that db file is located on some REMOTE computer.

Your application just OPEN it by network from that computer???
    well, this is not fast way.


> 1. Open local and remote dbs.
> 2. Compare records and see which need syncing.
> 3. Close remote db.
> 4. Present use with a dialog asking if the sync should proceed.
> 5. If yes, reopen remote db and do updates.
> 6. Close remote db.
> 
> It's pretty fast except steps #3 and #6, which are very slow if I use
> broadband and a server like .Mac (up to 100 seconds to close the db).
> So the sync takes an extra 3.3 minutes just to close the remote db!

* And you have disable V4RB LOG, right?

* if just do 
        Vdatabase.open
        Vdatabase.close

    for this remote db, then it also takes long ?

> (BTW, I close it after step 3 so that another user might sync to the
> same db while the person is deciding what to do when the dialog is
> put up).

Jon, actually you start to do client/server tasks,
    and you try avoid to use Valentina Server.
 
IMHO its time for you start to use it for such tasks.
Speed can go up to 17-20 times comparing to network access.

> This is, I'm guessing, due to an implicit db.flush when the db is
> closed. But in step #3 there is no need for this, because I'm not
> updating the db, just doing readonly searches.

But in the first case you have nothing to WRITE, yes?
Then flush() has nothing to do...
 
> Also, in step #6 there may be no need to flush the remote db if the
> records only change in the local db.
> 
> So what I'm asking is:
> 
> 1. Is there a way to avoid the db.flush when a db is closed? If not,
> can this be implemented as a feature request (e.g.
> db.closeWithoutFlush).
> 
> 2. Is there some other trick I'm missing with regard to speeding up
> this process?

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list