Hello,

Am Montag, 5. November 2012 schrieb John Johansen:
> On 11/01/2012 11:06 AM, Christian Boltz wrote:
> > here's a patch that speeds up aa-decode - in my case from 1.9s to
> > 0.3s (test log with about 900 lines, with 16 encoded lines)
> > 
> > The trick is to use bash regex matching instead of calling egrep for
> > each line.
> > 
> > It would probably also be possible to replace the sed calls with
> > bash
> > regex matching, but the savings would be minimal because typically
> > most lines are not encoded.
> > 
> > BTW: Not having quotes arond the regex is intentional - with quotes
> > added, bash wouldn't take it as regex.
> 
> So I am fine with this if we are going to drop more generic shell
> compat and require bash. I know in the past we have tried to not
> require bash, but I am unsure how important that is atm

Well, I already made aa-decode bash-specific with my last patch by using 
bash replacement like ${foo/bar/baz} instead of sed, so the performance 
patch won't change anything ;-)

I think it is safe to assume that bash is available on every linux 
system.


Regards,

Christian Boltz
-- 
> got a patch?
-ENOTMYJOB
[> Markus Rueckert and Bernhard Walle in opensuse-packaging]


-- 
AppArmor mailing list
AppArmor@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to