You can measure the performance yourself but I would guess that a single rule 
object is probably going to be better, that way you don't have to do the string 
searching cost multiple times.

As for number of threads in yara-python, I'm not aware of anything which 
exposes that option nor do I think it would be worth it due to the GIL getting 
in the way most of the time.

-- WXS

> On May 4, 2017, at 2:16 PM, [email protected] wrote:
> 
> Hi , 
> 
> I'm using Yara python to match about 500 rule files( with each several rules) 
>  against multiple files.
> What do you advise as best practise to have the best performance : 
>   - create a separate rule object for each rule file and iterate all the 
> rules and match against every file.
> 
>  - create one big rule object ( pass the different paths with the file paths 
> parameter) and match that rule object against every file.
> 
> Also the native yara version provides an option to specify the number of 
> desired threads when scanning a directory , is there something similar for 
> yara python ?
> I can't find anything about it in the docs...
> 
> Thank you
> 
>     
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "YARA" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"YARA" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to