Background Processing Option: Do not update Category Formulas

Started by meyersoft, July 14, 2014, 08:59:23 AM

Previous topic - Next topic

meyersoft

Hi,
since category formulas can slow down the system VERY much (especially when used with RegEx keywords), it would be nice to have an option to NOT auto-update category formulas.
Either globally (like Background Processing / Other / Update data driven categories) or per-formula (this might be too complicated to implement and to understand and maintain).

Actually, I had to remove my category formulas from the system because they slow it down a lot.
(see https://www.photools.com/community/index.php?topic=2812.0)
I don't need them very much, but having to re-import them on-demand is not really handy.

Mario

I have spent the past two days analyzing and fixing a pretty nasty error where a user could accidentally cause a reoccurring crash with a recursive (self-referential) category expression.

While working on that I changed how the @Category, @CatDistinct and @CatNoRecurse interpret and process their regular expression arguments. For cases where you can specify a path (as in case of your formula) IMatch is now 10 to 1000 times faster. You need to change your expression to start with @All when IMatch 5.1.8 is out (read the release notes for details) but the effort is worth it. Instead of searching all categories IMatch now utilizes the hierarchical structure.

Disabling formula parsing is no option because it would produce wrong results, and hard-to-track side effects. Except for the regular expression parsing (which is now much faster) formulas are fast - and the results are cached and only re-calculated as needed anyway.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

meyersoft

Hi Mario,

that sounds great - I will check in 5.1.8.
Thanks for the fast help (as always... :))

sinus

This is also great for me.
I wonder, has this also something to do with data-driven cats? I deleted them as well now, because they are often refreshed and loaded - I thought, well, IF I need them, I can always create them.  :D
Best wishes from Switzerland! :-)
Markus

Mario

Data-driven categories are also cached, once calculated. They only update when something in the database changes.
You can switch data-driven categories to manual under Edit > Preferences > Background Processing.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

meyersoft

Markus, switching data-driven categories update to manual as Mario describes helped a lot for speed here.

sinus

Quote from: meyersoft on July 17, 2014, 09:33:38 AM
Markus, switching data-driven categories update to manual as Mario describes helped a lot for speed here.

Thanks, Mario and Meyersoft, I will do that, when I create new Data driven cats, at the moment I have deleted all.
Best wishes from Switzerland! :-)
Markus