Hi! I’ve been using MCEBuddy for a few years. I am currently using MCEBuddy Premium 2.6.6.
I use MCEBuddy to keep sets of source directories (which I maintain on the local HDD of a PC running MCEBuddy) and destination directories (which are on a file server and accessed via SMB) synchronized, using the “Skip reconversion” and “Check history” options. The destination directories on the file server are used to serve converted media to clients. MCEBuddy is configured to convert files from certain source directories, and simply replicate files from others without converting (using the “Rename without converting” option). The main takeaway here is that the source directories are never emptied; files “live” in the source directories all the time, and changes are replicated to the “visible” directories on the file server as the source directories change. I currently have 9,589 files in the source directories.
All of this works. My problem is that scanning performance is abysmal and getting worse as I add files. The initial traversal of the directory trees and building the list of files is rather quick, finding all files in about 22 seconds and processing up to 1,000 files per second. (During this stage, I see the files enumerated in mcebuddy.log as “xxx is being monitored for syncing with output file”.) The parsing of files and comparing to what is in the history file, however, continues for another 49 minutes, processing only 3 to 4 files per second. (At this point, I see the files enumerated in mcebuddy.log as “xxx already converted with status Converted”.) This process seems mainly CPU-bound, as MCEBuddy.Service.exe averages 24-25% CPU usage on a 4-core system (obviously not a beast, with an Intel Core i5-7600 @ 3.5 GHz and 16 GB RAM). If I assign CPU affinity to 1 CPU core for that process, it uses 100% of that core. Of course I don’t know the internals of MCEBuddy, but I have to imagine that all of this CPU overhead is MCEBuddy comparing the files in the source directory tree against the records in the history file, which is 7.36 MB at this point. I know enough to realize that an INI file of this size is very expensive to parse. So I tried disabling the “Check history” option in all my conversion tasks, thinking that would cause MCEBuddy to ignore the history file and just check for the existence of the destination file name on the server for each source file name on the local drive. But it did not change the performance characteristics at all; it actually added 12 seconds to the scan (though that deviation is so minor in context that the setting change could be irrelevant).
I have used Process Monitor to examine what is going on, and even with “Check history” disabled, I see MCEBuddy.Service.exe checking each source file once, and doing literally hundreds of reads on the history file for each one, but not touching the file server at all. I guess it makes sense why it would need to read the history file regardless to find out what the destination file path is, but I expected some change in bevahior here. Regardless, this does not appear to be my silver bullet.
Can you suggest any other setting changes that might improve performance, or am I just pushing the practical limits of MCEBuddy’s architecture? I’d imagine this sort of use case would work much better with a real database (e.g. SQLite) and I think the history file is the bottleneck here, but I am open to suggestions.
I have already tried recreating the history file (Show history → Clear history, made sure “C:\Program Files\MCEBuddy2x\config\history” is gone, restarted the MCEBuddy2x service, started conversion and allowed it to rebuild). That also made no difference.
Check history enabled: 14:18:20 - 15:08:06 = 49m:46s
Check history disabled: 13:09:50 - 13:59:48 = 49m:58s
Thanks for reading!