On Fri, Aug 24, 2012 at 12:06:05AM +0200, Vladimir Nadvornik wrote:

> I think that for normal operation, the timestamps can be compared per 
> directory, at the end of filelist_read_real() function. The filelist there 
> contains up-to date content of the directory, so you need just one 
> corresponding SQL query and compare the filestamps.

this is just an update, to show that i'm still alive.

> Changed files then can be handled in idle callback (see g_idle_add()), one 
> file per callback, one transaction per callback.

After using this for some days, and after a lot of fine tuning: This is
just too slow. The transaction costs are too high, and even under the
best of circumstances transactions sometimes take more than a second
(a time in which geeqie is unresponsitive), and most of the time more
than half a second (in fact it's rarely at or below 0.25 seconds).
I tested this on two different machines (this linux machine mentioned
before, and a mac laptop).

I'd rather make one transaction after the whole batch of files is done,
or after 50 or 100 images.

The one transaction per file approach works so bad that using a remote
postgresql database over a VPN over DSL was measurably faster (one
transaction per file, too).


> This will ensure that the database is up-to-date for all files in working 
> directory, which is enough for sorting etc.

Well, yes, but that doesn't really help if you ^S changes to 230 files, as
i just did...
And you don't really want geeqie to re-sort 230 times during that, i think.


I usually import some hundred new images at once, delete a number, edit
some (keywords, rotating), and throw away another lot - and each of
these steps is painfully slow with the one transaction per file approach.


The problem really is the transaction cost, >= 0.5 seconds per transaction.
I *think* geeqie could live with the database layer giving up date 
information only after it finished importing one directory or all changes.
At least it seems to work...

Regards, Uwe

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geeqie-devel mailing list
Geeqie-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geeqie-devel

Reply via email to