photools.com Community

IMatch Bug Reports and Feature Requests => Bug Reports => Solved Bug Reports (for next version) => Topic started by: ubacher on March 14, 2025, 04:53:57 PM

Title: [NB] Delay when deleting files.
Post by: ubacher on March 14, 2025, 04:53:57 PM
I submit a log file (debug mode) from an occurence of a very long delay when deleting 7 files.


Look for TranBegin wait loop: in the log.

Hope this helps nailing it down.

IMATCH6_LOG delete.TXT

Title: Re: Delay when deleting files.
Post by: Mario on March 14, 2025, 05:08:28 PM
Why do you open a new thread, you already opened one for this problem? And we discussed things there, I've asked questions not answered yet and now we start a new thread again?

Why does IMatch need 25 seconds to load a database with less than 1,000 files?
What kind of drive is D:?
I've asked that in the other thread and got no answer. What kind of computer is this? Virus checker interfering?

The first couple of file removals take between 50ms and 200ms. Perfectly normal.
Then there is a remove file operation which took 8 seconds, but that was caused by several metadata search operations, e.g. for empty tags, the pattern '^True' and this made this tiny database so busy that IMatch had to wait 8 seconds before it could lock the database to perform the file deletion operation.

So, a database with less than 1,000 files takes 25 seconds to load (instead of maybe 2.5) and searching the metadata for 1,000 files takes multiple seconds, instead of milliseconds. All standard IMatch categories report as slow, which means it took the database more than 5 seconds to update these categories for only 1,000 files.

I would say that your system is not performing well, or at all.
A computer with for processor cores should be a lot faster with such as small database.
Make sure you have added an exclusion for IMatch 2025 (!) to your virus checker.
Title: Re: Delay when deleting files.
Post by: ubacher on March 14, 2025, 07:52:20 PM
QuoteMake sure you have added an exclusion for IMatch 2025 (!) to your virus checker.
I checked again. I had changed the folder C:\Program Files\photools.com\imatch6 as exception
but I missed changing the process - It was still at IMatch2023. I now changed this. Not sure if both (folder and process) are needed but I have fixed it now. Most likely cause of the trouble.
Title: Re: Delay when deleting files.
Post by: Mario on March 15, 2025, 09:06:54 AM
TODO 1 in Welcome to IMatch 2025! (https://www.photools.com/help/imatch/migrate_imatch2025.htm?dl=hid-1):

New File Name for the IMatch Executable (https://www.photools.com/help/imatch/migrate_imatch2025.htm?dl=hid-3)

No need to exclude the imatch6 folder, just exclude the folder containing your database.
Title: Re: Delay when deleting files.
Post by: ubacher on March 15, 2025, 11:35:56 AM
Well, I am confused as to what exactly should be excluded from the virus checker. (I am using Defender)
In the help file it says: the folder containing the database while in the release notes it says the executable c:\program files\photools.com\IMatch6\Match2025x64.exe.


I asked Copilot:
If I exclude a process in widows defender antivirus does that mean Defender does not check the files which the process works with, creates, deletes etc.
Answer:
When you exclude a process in Microsoft Defender Antivirus, it means that files opened, created, or modified by that process are not scanned by Defender's real-time protection.
However, the process itself is still scanned unless it is explicitly excluded as a file or folder. This exclusion applies only to real-time protection and monitoring, not to scheduled or on-demand scans.


Question: What about sub-processes which the process spawns?
When you exclude a process in Microsoft Defender Antivirus, the exclusion generally applies only to that specific process. Sub-processes spawned by the excluded process are not automatically excluded. If you want to exclude sub-processes, you would need to explicitly add them to the exclusion list as separate entries.


This ensures that only the processes and files you specifically intend to exclude are skipped during scans, maintaining a balance between performance and security.
------------------------------------------------------------------------------------
Based on this info I conclude:
We should exclude:
IMatch2025x64.exe
ImatchChromiumHelper.exe
exiftool.exe
What about ffmpeg.exe and ffprobe.exe?


The folder containing the db should be OK without exception.
The image files Imatch maintains should be OK. As long as we add images (and indeed other files) to the folder from another folder within Windows the files have already been scanned and will not be scanned by Defender after a move.


IMPackAndGo.exe I suppose should also be excepted since it will access and modify the db.
If not then the folder holding the db should be excepted.







Title: Re: Delay when deleting files.
Post by: Mario on March 15, 2025, 12:49:58 PM
Windows Defender usually does not get in the way. I use Windows Defender on one of my IMatch test systems, to monitor exactly this.

If you see no improvement after excluding IMatch2025x64.exe, check the Defender log files. It should tell you when it blocks an application from performing normally.

Since loading your 1,000 files database takes maybe 10 times as long as it should, I doubt that other helper tools like exiftool.exe, ffmpeg or pdflib are involved in the problem. They don't run at this time.

The problem is that everything related to disk I/O in IMatch on your machine is super-slow.
From loading the database to recalculating categories.This indicates that something is stepping on the break severely whenever IMatch reads or writes data from/to the drive. A 1000 files database should not need more than 5 seconds to recalculate a single category. This is a typical result from a virus checker interfering badly, like rescanning the database after each update - and IMatch updates the database thousands of times per second.
Title: Re: Delay when deleting files.
Post by: ubacher on March 16, 2025, 07:34:15 AM
Checked the error log - and indeed I found many of these:

A corrected hardware error has occurred.
Component: PCI Express Root Port

I will do a complete restart and if this does not help the planned new laptop will
be ordered sooner than thought.
Title: Re: Delay when deleting files.
Post by: Mario on March 16, 2025, 08:43:03 AM

QuoteA corrected hardware error has occurred.
Component: PCI Express Root Port
This does not sound good. Make sure you have installed the latest BIOS for your computer, all drivers are up-to-date, Windows up-to-date etc.

Hardware issues like this will bring down the entire system, especially when related to PCI, which is the backbone, connecting all parts of your computer.