Hi,

On St 4. května 2011, Omari Stephens wrote:
> Howdy, all
> 
> I'm poking around with the marks code.  Currently, marks are _really 
> slow_ when you connect at least one mark to an image tag — when an image 
> with no marks drops to zero refs, we lose track of what marks it may 
> have, and on the next marks filtering op, we end up having to hit the 
> XMP for every file in the directory.
> 

This analysis is not exactly right.

1. All files in current directory are hold in ViewFile->list so they can't 
have zero refs.

2. When there is a connection between mark and keyword, the mark value is 
no longer taken from FileData, but file_data_get_mark() calls 
file_data_get_mark_func and uses it's result. The value in FileData is then 
updated, but it is important only for keeping the last value after the 
connection is switched off.

3. file_data_get_mark_func points to meta_data_get_keyword_mark which then 
calls metadata_read_list(). It uses cached metadata when they are available
or it really reads them from file.

So IMHO the problem appears the number of files in the directory is higher 
than the number of files with cached metadata. Caching all metadata is quite 
expensive (even 100KB per file), so I would fix this by implementing another
long-term cache for selected metadata entries (keywords) in 
metadata_read_list().

Vladimir



------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Geeqie-devel mailing list
Geeqie-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geeqie-devel

Reply via email to