Cleaning the Lightroom Cache

I got back from a trip on Friday evening and found my internet connection isn’t working. I was offline off-line until Sunday night.

I have about 45,000 pictures in my Lightroom database. I found it is getting slower and slower even after optimizing the database.

I decided to delete all the cache files and let Lightroom rebuild them as necessary. The hidden directory Lightroom 2 Catalog Previews.lrdata contained an immense directory tree of files with names like C:\Documents and Settings\Ian Fuller\My Documents\LightroomDatabase\Lightroom 2 Catalog Previews.lrdata0A00A0DB85-3026-4CBE-95E9-279652FE948B-2a9017b9dbe8a98b7c0ad2fd01406ceb-61.lr-preview.noindex which seem to be indexed by a file called thumbnail-cache.db. (Despite the .noindex extension).

I deleted the lot and compacted my disk. The compaction tool put the Lightroom database together at the start of the disk as it is accessed so often.

Lightroom was much faster when I restarted it. Yes, there was a pause when it made previews of my pictures but after that it was very quick to do things like change from Library to Develop,

I had Lightroom set to discard 1:1 previews after one week but I still had this huge cache. Perhaps the cache is the secret why Lightroom can do things like preview the effects of a change so quickly. The designers traded off disk space for performance. I think that is the right trade-off – I said before, disk space is cheap; a photographer’s time isn’t.

I think Lightroom was choking on the large number of files. Maybe my use of Lightroom isn’t what Adobe anticipated. I frequently look at old pictures. I think Lightroom refreshes its preview cache for the whole directory when I look at a photo for that day. If I have taken 200 pictures that’s many previews.

I have never seen any advice that clearing the cache is a good thing to do but it seemed to work for me.

I dumped the contents of my new, much smaller, thumbnail-cache.db. It’s another SQLite database. I’d like to examine it more closely out of curiosity, but I don’t think there is much point. Unlike the metadata in the main catalog database, I cannot think of what I could do with the preview images.

Advertisements

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: