Skip to content

10k+ rule using ABAC takes about 500ms #336

@Castle1984

Description

@Castle1984

I'm using ABAC model with casbin_sqlalchemy_adapter and there is about 10k+ rules.

Some rules in Mysql :
image

For example, The value of 't' calculated from this code,
time_start = time.time() result = enforce_mysql.enforce(sub, obj, act) t = (time.time()-time_start)*1000 ,
indicates that one check takes approximately 500ms+.
This differs significantly from the time shown in the benchmark for RABC.

Also, I have tried Fastbin,
such as enforce_fast_mysql = casbin.FastEnforcer('model.conf', adapter_mysql),
but it didn't improve a lot.

Is it my way of testing that is wrong?
Do you have any improvement methods to help me achieve the speed of RABC (large) in the benchmark? Thanks a lot.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions