Nested rules and matching: slow/crash

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Nested rules and matching: slow/crash Mon Oct 31, 2016 7:56 am • by bapou
Hi,

I tried to use nested rules to sort bad quality OCR'ed pdfs, but this seems to crash / slow down Hazel a lot.
e.g. using this ruleset and trying out preview on a folder with two files takes >2min
Image

Hazel is 4.06.

This is from the Log file:
/Users/XXXXX/Documents/Workflows/Scans - Incoming/1 Category processed in 160.527860 seconds
Restarting didn't help.

I switched on the DEBUG mode but the log is not clear for me. It contains lines as (XXXX was my username):

2016-10-31 12:34:01.739 HazelHelper[389] DEBUG: Thread 0x7fafc3c06af0: Timer fired for folder: /Users/XXXXX/Documents/Workflows/Scans - Incoming/1 Category
2016-10-31 12:34:01.739 HazelHelper[389] DEBUG: Thread 0x7fafc3c06af0: Run worker for folder: /Users/XXXXX/Documents/Workflows/Scans - Incoming/1 Category
2016-10-31 12:34:01.805 hazelworker[73446] ###main load address: 0x1073ff000
2016-10-31 12:34:01.811 hazelworker[73446] ###Noodle load address: 0x10751d000
2016-10-31 12:34:01.817 hazelworker[73446] ###CK load address: 0x1074e0000
2016-10-31 12:34:01.842 hazelworker[73446] DEBUG: Program is licensed.

which might represent a crash?

Do I ask too much from Hazel and need simpler rules?

Thanks
bapou
 
Posts: 4
Joined: Sat Oct 22, 2016 5:47 pm

Re: Nested rules and matching: slow/crash Mon Oct 31, 2016 11:17 am • by Mr_Noodle
Those lines are always output in case a crash happens (that info is critical to make sense of the crash). By itself it doesn't mean anything.

"Contents contains" uses Spotlight. It may be the case that Spotlight is super slow on your system. Try searching for those terms in Spotlight and see how long it takes. Considering it is doing this for multiple conditions over every file in the folder, it may end up taking some time.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Nested rules and matching: slow/crash Tue Nov 01, 2016 7:32 am • by bapou
The problem seems to be "contents contains" with a search word of only three letters. If I remove the short words, the script is running fine. Thanks for your help.
bapou
 
Posts: 4
Joined: Sat Oct 22, 2016 5:47 pm


Return to Support