Re: [libvirt] [PATCH 3/3] scripts: check-aclrules: use regular expressions less often

2019-11-22 Thread Erik Skultety
On Fri, Nov 22, 2019 at 11:37:31AM +0100, Ján Tomko wrote: > On Fri, Nov 22, 2019 at 09:00:12AM +0100, Erik Skultety wrote: > > On Wed, Nov 20, 2019 at 07:32:46PM +0100, Ján Tomko wrote: > > > Use a simple > > > if "substr" in line > > > before running a regular expression, which saves time, > >

Re: [libvirt] [PATCH 3/3] scripts: check-aclrules: use regular expressions less often

2019-11-22 Thread Ján Tomko
On Fri, Nov 22, 2019 at 09:00:12AM +0100, Erik Skultety wrote: On Wed, Nov 20, 2019 at 07:32:46PM +0100, Ján Tomko wrote: Use a simple if "substr" in line before running a regular expression, which saves time, especially if the regex has a capture group. This reduces runtime of the check by

Re: [libvirt] [PATCH 3/3] scripts: check-aclrules: use regular expressions less often

2019-11-22 Thread Erik Skultety
On Wed, Nov 20, 2019 at 07:32:46PM +0100, Ján Tomko wrote: > Use a simple > if "substr" in line > before running a regular expression, which saves time, > especially if the regex has a capture group. > > This reduces runtime of the check by almost 78 % for me. > > Signed-off-by: Ján Tomko > ---

[libvirt] [PATCH 3/3] scripts: check-aclrules: use regular expressions less often

2019-11-20 Thread Ján Tomko
Use a simple if "substr" in line before running a regular expression, which saves time, especially if the regex has a capture group. This reduces runtime of the check by almost 78 % for me. Signed-off-by: Ján Tomko --- scripts/check-aclrules.py | 26 +++--- 1 file