Slow Compact and Optimize

Started by BanjoTom, September 29, 2019, 03:25:37 PM

Previous topic - Next topic

BanjoTom

What might cause the "compact and optimize" tool to suddenly seem take two or three times longer than usual to run, despite little change in the number of items in my database?  This longer cycle of optimization also seems to show up when I use "Pack and Go" after exiting my database -- it's all taking much longer, and I guess it's the "compact and optimize" part of Pack and Go that's now running slower. 

My database of 72,400 files is stored on an SSD (has been for some time), but it's now taking 9 minutes to compact and optimize.

Any ideas or suggestions?
— Tom, in Lexington, Kentucky, USA

Mario

If this has come out of the blue...

+ did you reboot your system once (Windows 10 does not really reboot anymore)?
+ new software installed?
+ virus checker interfering?
+ other software keeping the disk busy? Check in Windows Task Manager, Disk Utilization
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

BanjoTom

No luck yet with this issue.

I have done several reboots of my Win10/64 system, both "restart" and also a full "shutdown."  The slow Compact & Optimize issue remains: 8 or 9 minutes to run in IMatch, and a total of 11 minutes (most of it on the Compact&Optimize step) in Pack and Go.

The only new software recently installed was Firebox browser, and I had added the Ublock adware blocker to Google Chrome.  I UNinstalled UBlock and then rebooted again; but that made no difference in my slow Compact&Optimize.

My virus checkers are Malwarebytes Premium and the built-in Windows Defender.  I have made no recent changes to either of those, and don't really know how I could briefly disable them to test if they're interfering.

Disk utilization in Task Manager seems generally very low; when I'm actively running IMatch and doing a "Compact and Optimize" operation, disk utilization on the SSD (C drive) shows intermittent activity graph (screen capture attached). 

Could it help if I run "Debug Logging" and then go through a "Compact and Optimize" cycle and send you the resulting log?

AND -- another problem I've noticed, probably unconnected with this Compact&Optimize issue: when I create a Favorite from a metadata template, it works while I'm in IMatch, but once I exit and restart IMatch, that Favorite can no longer be found in the "Favorites" panel.  Another mystery. . .   

— Tom, in Lexington, Kentucky, USA

Mario

Compact & Optimize is basicially a "copy all blocks of the database except the ones no longer needed to a new file".
This is an atomic operation that runs 100% in the database system. Since you did not update IMatch or the database system, the only explanation is an external cause.
Have you made IMatch and the database folder (!) containing your database an exception in your virus checker? Virus checkers update several times a day and every update may install a 'bug' of sorts on your machine...

PS.: Compact and optimize is not really needed that often on a SSD. Maybe after adding 50,000 or so more files.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

BanjoTom

Problem seems to be solved -- thanks, Mario!

I made sure to exclude the "DATABASES" folder on my SSD (which is where my IMatch databases are stored) from both Malwarebytes and from Windows Defender.

Also: I had about 30,000 image files in both MY (main) database and also in another one (call it "HERS") that mostly includes files stored on my wife's computer, accessible through our local network.  I realized that I didn't need that duplication of "the same" images in two databases, so I removed those files from "HER" IMatch database.  Perhaps that played a role somehow in the slow C&O times.

Again, MANY thanks for your helpful overview and suggestions!  No software company provides better support than photools.com!   
— Tom, in Lexington, Kentucky, USA

Mario

The compact & optimize operation depends only on your local disk. I guess that the virus checker interfered.

Note: It is usually counter-productive to have two virus engines running - because they may block each other or produce other strange effects.
Usually Windows Defender deactivates itself when it detects another anti-virus solution.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook