42 Messages
•
802 Points
Tue, Oct 31, 2017 9:41 AM
5
Lightroom Classic: Disable smart collection
Large or multiple smart collections can seriously impact performance.
It would be useful to disable a smart collection or, even better, disable a set of smart collections, so they are no longer processed until re-enabled.
As it is we can only delete the smart collections and recreate them when we need them again next month.
A selective export and import option of smart collections would serve a similar purpose and would add functionality to LR but would not be as simple to use just for this disable/enable purpose.
Whilst here I would also like to add my vote to the many people who have asked for a smart collection A only to select images from within smart collection B. Though I can see some concerns: how many levels down does it allow should B only select from smart collection C, etc. That is maybe why they have not implemented it. Also there would be a possibility of creating an infinite loop should smart collection A only select from B but B is set up to only select from A. Perhaps it could be limited to only allow selection from smart collection B provided that B does not have use any sub-selection of its own.
It would be useful to disable a smart collection or, even better, disable a set of smart collections, so they are no longer processed until re-enabled.
As it is we can only delete the smart collections and recreate them when we need them again next month.
A selective export and import option of smart collections would serve a similar purpose and would add functionality to LR but would not be as simple to use just for this disable/enable purpose.
Whilst here I would also like to add my vote to the many people who have asked for a smart collection A only to select images from within smart collection B. Though I can see some concerns: how many levels down does it allow should B only select from smart collection C, etc. That is maybe why they have not implemented it. Also there would be a possibility of creating an infinite loop should smart collection A only select from B but B is set up to only select from A. Perhaps it could be limited to only allow selection from smart collection B provided that B does not have use any sub-selection of its own.
Ideas
•
Updated
a year ago
61
9
5
Helpful Widget
How can we improve?
Tags
No tags available
Responses
Official Solution
melissa_rios
Adobe Administrator
•
109 Messages
•
2.9K Points
3 years ago
This feature should be present in today's Lightroom Classic CC 7.2 version. Please update your application and let us know what you think!
Lightroom Classic CC 7.2 is now available!
Thanks,
Melissa
0
0
Johan_Elzenga
Champion
•
3.3K Messages
•
58.3K Points
3 years ago
The problem with feature suggestions is that people can suggest anything they like. Thy don't have to check how difficult it is to add this to the existing code. They don't have to check wether Lightroom would become even more bloatware with all these features. They don't have to check whether more than a handful of people might ever use this. And of course they always think that their feature request is the most important request in the history of Lightroom and so it is unbelievable that it is still not implemented...
Johan W. Elzenga,
http://www.johanfoto.com
0
Johan_Elzenga
Champion
•
3.3K Messages
•
58.3K Points
3 years ago
Johan W. Elzenga,
http://www.johanfoto.com
0
colink_technology
42 Messages
•
802 Points
3 years ago
6
John_R_Ellis
Champion
•
5.5K Messages
•
97.5K Points
3 years ago
"Each group takes over 2 minutes to process before the numbers appear. If I close LR and re-open it immediately it takes 20 seconds to refill them. But by the next day when I start LR it is back to over 2 mins per group."
This strongly indicates that unusually slow or excessive disk i/o is slowing down the "cold starts" compared to the "warm starts" by a factor of 6.
With a cold start, the operating system's in-memory disk cache is empty, so LR has to read the relevant parts of the catalog file from disk. But with a warm start (restarting LR immediately after you exited), the catalog file is already in the disk cache, so little extra disk i/o is required.
There are two possibilities: Your disk is responding to read requests unusually slowly, or your catalog file is excessively large for some reason. Once you post the size of your .lrcat catalog file, we can compare the size / photo with my catalog and others to see if yours is excessively large (per photo).
Before someone shouts "Optimize!", consider: LR Classic optimizes the catalog when it converted from an earlier version, so your catalog was optimized in the last week or so. So while you could try File > Optimize Catalog, it's unlikely it will have any effect. (It also compresses the history field of each photo, resulting in catalogs that can be 50% or more smaller than LR 6.)
------------------------
I did some quickie timings with a plugin script to verify that on warm starts, your LR is executing smart collections roughly as fast as mine, further pointing the finger at cold-start disk i/o.
I timed the execution of a smart collection very similar to the ones you posted. For warm starts, I observed times similar to what you (roughly) observed: 0.9 x 10^-5 sec/photo on my catalog, versus 1.8 x 10^-5 sec/photo on your catalog. But for cold starts, I observed just slightly slower times of 1.1 x 10^-5 sec/photo, versus order-of-magnitude larger times of 11 x 10^-5 sec/photo on your catalog.
(My timing was done on a somewhat smaller catalog stored on a reasonably fast external hard drive, with a Macbook Pro mid-2015 with 16 GB memory. The test smart collection returned 14K photos. The SQL query execution time is directly proportional to the number of photos, since SQL indexes can't be used for these queries.)
Below is the timing script I used. You can run this script in your LR by doing Preferences > Presets, clicking Show Lightroom Presets Folder, and creating a subfolder "Scripts" under the "Lightroom" folder that's selected in Mac Finder or Windows Explorer. Then copy the script into a file "timesmartcollection.lua" in that folder and restart LR. You'll see a Scripts menu appear on the far right of LR's menu bar, and the script "timesmartcollection" will appear in that dropdown.
If you want to measure cold and warm starts, you'll have to make a copy of your catalog folder and measure with the copy. Delete the smart collections from that copy so they don't affect the timing. To measure cold starts, you can either reboot your computer each time; or on Mac, use the "purge" command in Terminal. On Windows, the following recipe supposedly works, though I haven't tried it: https://stackoverflow.com/questions/478340/clear-file-cache-to-repeat-performance-testing
If you want to time a different smart collection, in the LR's Collections panel, right-click the smart collection and do Export Smart Collection Settings. Open the exported .lrsmcol file in a text editor and copy and paste into the "timesmartcolleciton.lua" script where indicated.
1
John_R_Ellis
Champion
•
5.5K Messages
•
97.5K Points
3 years ago
So you'd first select the desired smart collection and then the appropriate camera/lens filter.
0
John_R_Ellis
Champion
•
5.5K Messages
•
97.5K Points
3 years ago
The camera serial number, lens id, apertural, and focal length are all stored in a few small SQL tables, and each of those fields have indexes. But the tables are small enough such that a linear scan through 90K in-memory entries should be extremely fast even if it doesn't use the index (e.g. for the "contains" operators), and if the tables don't happen to be in memory, they could be read in a small fraction of a second. That's all demonstrated by timings on my catalog.
So clearly something bad and out of the ordinary is happening with your catalog, but I don't see any clues as to what.
In addition to using filter presets as suggested before, a couple more workaround suggestions:
- Use "is" rather than "contains" for serial number and lens id for any remaining smart collections using those fields. That will allow the indexes to be used (but as discussed before, the tables are so small that a linear scan without the indexes should be plenty fast enough, unless the SQLite query optimizer has gone off the rails with your particular queries).
- Try exporting a copy of the catalog with File > Export As Catalog, with all of the options unchecked, and open the copy in LR. That will export a "clean" SQL database, perhaps "cleaner" than what the Optimize command does -- I believe the Export essentially rebuilds the tables from scratch. So maybe there are some rotted bits that are embedded in the old catalog that exporting will remove. Just an educated guess, probably only a 15% chance of having an effect.
3
sreenivas_ramaswamy
53 Messages
•
1.1K Points
3 years ago
I have logged a feature request internally so that we can track this idea.
For now users can do the following workaround (not great but still it works) to get the same effect. Create a Collection set called "Disabled smart collections" or any name you like. Move all the smart collections you want disabled into it. Collapse the collection set and restart Lightroom. As long as this collection set remains collapsed they won't be evaluated. One drawback of this approach is that users need to remember to keep the collection set collapsed. If they open it they need to remember to close it and restart Lightroom to get the benefit.
5
dan_hartford
521 Messages
•
12.6K Points
a year ago
I have over 50 smart collections, maybe closer to 75 but I don't need them all to be active all the time. Some I only use infrequently. But I don't want to delete them as they are at times quite complex. I still want to see them in the "collections" panel so I don't want to Export the Smart Collection to a file (for future use) and delete them from LR. I also don't need LR to continuously keep their content current which sucks up a fair amount of processing resources.
My request is to add a "Status" toggle on the Smart Collection Edit screen and/or in the Collections Panel that will allow me to enable or disable (activate or deactivate) individual smart collections. When "enabled they would behave as they do now. When disabled LR would gray them out in the Collections Panel, and would not keep their image content up to date.
Shouldn't be that hard to implement.
Thanks -- Dan
2
0