#48175 Avoid using regex in ACL if possible.
Closed: wontfix None Opened 7 years ago by nhosoi.

Too expensive for the acl operation?

$ egrep _re_ acl/*.[ch]
acl/acl.c:  re = slapi_re_comp( pat, &re_result );
acl/acl.c:  /* slapi_re_exec() returns 1 if the string p1 matches the last compiled
acl/acl.c:  rc = slapi_re_exec( re, realval, -1 /* no timelimit */ );
acl/acl.c:  slapi_re_free(re);

in a test scenario provided by qa the high cpu usage by the regex code could be confirmed [perf output attached]

You patch looks good!

Could you share the top result from the build which your patch is applied to? Thanks!

screenshot of perf top with fix attached

Replying to [comment:5 lkrispen]:

screenshot of perf top with fix attached

Thank you, Ludwig!! What a beautiful result!!

Note: 389-ds-base-1.3.4 was branched after this patch was pushed.

Closing this ticket as FIXED.

Metadata Update from @lkrispen:
- Issue assigned to lkrispen
- Issue set to the milestone:

5 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1506

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

2 years ago

Login to comment on this ticket.

Attachments 2