LIGHTROOM: Expand and Collapse All Stacks use unreasonable memory and CPU

  • 1
  • Problem
  • Updated 5 years ago
  • (Edited)
Expanding and collapsing stacks when a very large number of photos is selected takes an unreasonable amount of time and consumes a huge amount of memory.

In a 22K photo catalog there are 4.8K stacks. With All Photographs and no photos selected, the commands Expand All Stacks and Collapse All Stacks complete in a couple of seconds and have minimal impact on memory.

But if I first select all photos and then do Expand All Stacks or Collapse All Stacks, the commands take about 2 minutes each to complete, and memory usage zooms up. After two cycles of Expand All Stacks/Collapse All Stacks, memory Commit Size goes from 359,228K to 896,140K. (All the panes on the right-hand side -- Keywording, Metadata, etc. -- were collapsed.)

LR 5.2RC, Windows 7 64-bit.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3857 Posts
  • 1014 Reply Likes

Posted 5 years ago

  • 1
Photo of Rikk Flohr

Rikk Flohr, Champion

  • 1373 Posts
  • 335 Reply Likes
It looks to me like the operation takes the same time either way.

The difference is with all photos selected, the database has to do a Metadata Read on all files and that is what is taking the the extra time.

So your choice is to Expand/Collapse all stacks without a Metadata summary or to Expand Collapse all stacks with a Metadata Summary and realize you pay a penalty for having all files selected.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3857 Posts
  • 1014 Reply Likes
In my catalog, Expand/Collapse All Stacks takes 40 - 100 seconds if all photos are selected, 2 - 8 seconds if not. The stacks actually showing in grid view don't expand/collapse until the very end of that time period.

I'm not sure what you mean by "the database has to do a Metadata Read on all files". As I mentioned, all the right-hand side panes, including Keyword List and Metadata, are collapsed. In this situation, what would LR be reading from the catalog when all photos are selected, as compared to when none are selected?
Photo of Rikk Flohr

Rikk Flohr, Champion

  • 1373 Posts
  • 335 Reply Likes
Collapsed or not is irrelevant. The Metadata panel does not have to be open for the Metadata read to take place.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3857 Posts
  • 1014 Reply Likes
If the Metadata panel is closed, why would LR need to read the metadata from all 22K photos?