fix: FastEnforcer not fast#344
Merged
leeqvip merged 1 commit intoapache:masterfrom May 21, 2024
mbierma:bugfix/faster-fast-enforcer
Merged
fix: FastEnforcer not fast#344leeqvip merged 1 commit intoapache:masterfrom mbierma:bugfix/faster-fast-enforcer
leeqvip merged 1 commit intoapache:masterfrom
mbierma:bugfix/faster-fast-enforcer
Conversation
|
@Nekotoxin please review |
Member
|
@mbierma fix CI errors: |
Contributor
Author
leeqvip
approved these changes
May 21, 2024
Member
|
@leeqvip the CI for this PR didn't pass. And the new release has been blocked. See: https://github.com/casbin/pycasbin/actions/runs/9169440383 . I will revert this PR. |
github-actions bot
pushed a commit
that referenced
this pull request
May 21, 2024
## [1.36.1](v1.36.0...v1.36.1) (2024-05-21) ### Bug Fixes * FastEnforcer not fast ([#344](#344)) ([8aef43b](8aef43b))
|
🎉 This PR is included in version 1.36.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Contributor
|
Passed after re-run. |
Member
|
@leeqvip great! |
Chimou0
pushed a commit
to Chimou0/pycasbin
that referenced
this pull request
Jul 17, 2025
Co-authored-by: mbierma <3448579-mbierma@users.noreply.gitlab.com>
Chimou0
pushed a commit
to Chimou0/pycasbin
that referenced
this pull request
Jul 17, 2025
## [1.36.1](apache/casbin-pycasbin@v1.36.0...v1.36.1) (2024-05-21) ### Bug Fixes * FastEnforcer not fast ([apache#344](apache#344)) ([8aef43b](apache@8aef43b))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
The FastEnforcer class has a check to see if
FastEnforcer._cache_key_orderis None. If None, the enforcer does not use thefast_policy_filterwhich provides significant performance enhancements. This is likely a bug, asFastEnforcer._cache_key_orderrefers to the class variable, and not the current instance's value.self._cache_key_ordershould be checked instead.Related Issues
#336
#71