8 Replies Latest reply: Jul 22, 2011 2:07 PM by bonalymac999 RSS

    Optimize & Folders

    bonalymac999 Community Member

      One one of my regular quarterly tidy-ups, I've just discovered 7,351 EMPTY directories in my Lightroom directory. I do have 4 catalogs and quite a lot of images, but surely my regular (weekly) optimizing should be clearing this up.

       

      Apart from it being lazy/bad programming, it does cause me problems directly. Backup, virus and malware scans all take longer than necessary as all  these directories need to be checked.

       

      Any thoughts?

       

      Colin

        • 1. Re: Optimize & Folders
          dj_paige Community Member

          Optimize Catalog in Lightroom does not do anything to your folders. It leave them unchanged. It was never the purpose of Optimize Catalog to manipulate folders, so it is not "lazy/bad programming".

          • 2. Re: Optimize & Folders
            MikeLeone Community Member

            The catalog is the single file .lrcat. This is what gets optimized. No other files or folders are touched, since files and folders have nothing to do with optimizing the catalog (i.e., the database that LR uses to keep track of your photos).

            • 3. Re: Optimize & Folders
              bonalymac999 Community Member

              Thanks for the response, that's usefull to know.

               

              However, I think it is lazy/bad programming. I think that a basic user would feel that optimizing would/should include all aspects of "tidying" up a catalog. Leaving orphan folders behind like this IS bad/lazy programming. Lightroom creates these folders, Lightroom should manage them.

               

              If my results are typical, then I suspect many users who do not do maintenance will be staggered to see the number of unused folders clogging up their system.

               

              Colin

              • 4. Re: Optimize & Folders
                Hal P Anderson Community Member

                Colin,

                 

                Those empty directories are in the lightroom preview cache (the *.lrdata folder). It is indeed a strange design, but things have been that way since the first Beta, and I don't think they are likely to change any time soon.

                 

                The *.lrdata folder can be recreated at any time, so you don't need to back it up. Likewise, those folders aren't likely to contain malware, so you could exclude them from your virus scans.

                 

                Hal

                • 5. Re: Optimize & Folders
                  bonalymac999 Community Member

                  Yes I understand that technically the lrcat is the catalog.


                  But again to a non-technical user, the myriad folders are every bit as much a "the catalog" as the lrcat file. As I said, Lightroom creates them, Lightroom should manage them.


                  If we were talking about a handful of directories, I could see the argument, but when thousands of directories are left as orphans (and I've never read anywhere anyone telling me that this issue exists, never mind whether I should do something about it), then I think it is an issue. I've just looked in the help file, and there is no mention that I've found so far.

                   

                  Every back up is extended in size and time taken. Every scan, every malware scan, defrags lots of issues are affected. It possibly/probably has a speed implication on Lightroom and all others software run on the PC.

                   

                  Many users will have no way of finding Empty directories never mind removing them. So it really is LR's reposnsibility to clean up after itself.

                  • 6. Re: Optimize & Folders
                    bonalymac999 Community Member

                    Hal

                     

                    Good points,

                     

                    In fact I use Acronis, and it is set up to exclude those files, but again many users will not know this.

                     

                    I also take your point on scans, but for the same reason I back-up every night, I scan ALL folders. I omit nothing when scanning. I know it may be unlikely, but I'd rather be safe than sorry

                     

                    Colin

                    • 7. Re: Optimize & Folders
                      clvrmnky Community Member

                      If these are empty directories in either SQLite DB (that appears as a set of directories to the user and the OS) then they are not actually unused. SQLite is a file-based RDBMS that uses directories the same way other RDBM systems use discrete pieces of disk partitioned into read-write access. The directories are referenced in another place via an index (not a DB index) which maintains the tree of folders for fast read-write operations against the DB.

                       

                      This is just the way SQLite works. Those empty folders are part of the whole .lrcat or .lrdata collection, and Adobe has very little say in the matter if they use supported API calls to maintain the databases.

                       

                      That is, an optimize is fundamentally a "vacuum" call, which will not (as far as I know) remove those directories. There are some operations and situations where those directories will be recreated and reindexed by the RDBMS engine, perhaps removing some as it deallocates unused space; but the way databases grow and shrink you are always going to see some empty nodes. This is actually a good thing, as it means the DB is doing allocations correctly.

                       

                      Plainly put: this is completely normal and expected. Any utility should be smart enough to handle empty directories, since SQLite is not the only thing in the world that works this way.

                      • 8. Re: Optimize & Folders
                        bonalymac999 Community Member

                        Thanks clvrmnky

                         

                        Very intersting input.

                         

                        If that's the case, then I apologise to LR. I'm still disappointed that as many as 7500 directories are unused.

                         

                        However if that's down to SQLLite, then there's nothing LR and therefore Adobe can do about it.

                         

                        It would have been nice to have some info about it in the help file tho!

                         

                        Colin