Actions

XnView MP - The most scalable solution

From XnView Wiki

Revision as of 08:35, 11 April 2014 by M th (talk | contribs) (Created page with "== Tips about scalability == XnView MP provides (one of) the most scalable multimedia manager today. However in order to keep it in shape we need to take in account some hints....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Tips about scalability

XnView MP provides (one of) the most scalable multimedia manager today. However in order to keep it in shape we need to take in account some hints.

  • Use WebP compression - Go to Tools | Settings | Database - in Compression drop-down choose WebP. It is a significantly better compression than JPEG and helps to reduce the database footprint.
  • Be conservative with the size of the stored thumbnails. XnView MP has the possibility to dynamically upscale the thumbs upon request. Accept a little 'fuzziness' for your thumbnails. A rule of thumb would be like this: Set up the dimensions of the thumbnails in Browser to be at the (normal) size which works best for you. Go to Tools | Settings | Database and press Get thumbnail Size - lower a little (eg by 10%) the values in there, keeping the proportion ratio.
  • Assure the best storage environment for your databases.
    • Keep your databases - especially the Thumbs.db database - on SSDs rather than Hard Disks.
    • Try to put the databases on a secondary (non-busy) drive (not the drive with the operating system on it).
    • If you can, have the databases (xnview.db and thumbs.db) on separate drives - it will speedup the access.

To change the location of your databases you can go to Tools | Settings | Integration | Paths. You can change the paths from the 'Other settings' pane.

  • Increase the amount allocated to your Database engine. If you have a big collection and memory set it at 100 - 200 MB or even more.
  • Optimize periodically your Database: See the next section.

Database maintenance options

Go to Tools | Settings | Database and press Optimize... button. The options there are explained bellow.

First of all, we must define the notion of cataloged vs scanned

a Scanned file is the a file which is added to (entered into) database by the (automatic) subsystem which builds the thumbnails and enters all the basic (meta)data about the said file: name, directory, EXIF, machine-generated IPTC etc.

a Cataloged file is a Scanned file for which an user added information (information = data with human meaning): color, rating, keywords/categories, tags/albums, user comments (& other human generated IPTC etc.) etc.

So, Cataloged = Scanned + User Entered Information

Remember the above when you'll read the descriptions bellow.


Optimize (long process)

In the long run, the DB file becomes fragmented hence the time to retrieve a certain info increases (sometimes a lot) because of 1.) disk fragmentation - the disk head will need to jump from sector to sector to find the requested info and 2.) pointer / page fragmentation: the program needs to jump from page to page because of a (very) deep chain of pointers accessed very often) in order to get the desired record / index bucket.

That's why DB engines have a feature (usually called VACUUM) which freezes the current DB, copies the entire content in a new file (which is, of course, "ok"), deletes the old DB, renames the new DB to the old name and connects to it. Because of all this transfer, the process is very slow for a large file.

Remove empty directories

Will remove the folders which have 0 (zero) files in database. It will make the Folders table smaller thus making the system somewhat faster. It is very efficient. Leave this option (almost) always on.

Clean files

Remove the (meta)data AND the thumbnails from the scanned files but NOT from the cataloged ones. IOW all the non-cataloged files disappear from the DB. Quite fast and very useful to remove the 'fat'/cruft from the DB. Very efficient.

Clean thumbnails

Remove the thumbnails but keep the (meta)data from the scanned files AND from the cataloged ones. By far, the thumbs due of their very nature are dragging the performance down (big DB size etc.). There's no problem to remove thumbs from the cataloged ones (if one knows what he's doing) because they are regenerated on demand.

Check for orphaned directories

It removes from the database the directories which the OS cannot find anymore. Here is a very big discussion what happens with the offline media (removable media, servers which can go down, network rights etc.), with already cataloged files, with relocation etc. ...but for the time being just take it as is. This is very very fast and very efficient in keeping the DB performance up. ...if one is careful to not wipe cataloged things from places which he doesn't want to.

Check for orphaned files

The same principle from 'Check for orphaned directories' but the process is much slower and less efficient.