Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: FastEnforcer not fast #344

Merged
merged 1 commit into from
May 21, 2024
Merged

fix: FastEnforcer not fast #344

merged 1 commit into from
May 21, 2024

Conversation

mbierma
Copy link
Contributor

@mbierma mbierma commented May 20, 2024

Description

The FastEnforcer class has a check to see if FastEnforcer._cache_key_order is None. If None, the enforcer does not use the fast_policy_filter which provides significant performance enhancements. This is likely a bug, as FastEnforcer._cache_key_order refers to the class variable, and not the current instance's value. self._cache_key_order should be checked instead.

Related Issues

#336
#71

@casbin-bot
Copy link
Member

@Nekotoxin please review

@casbin-bot casbin-bot requested a review from Nekotoxin May 20, 2024 07:12
@CLAassistant
Copy link

CLAassistant commented May 20, 2024

CLA assistant check
All committers have signed the CLA.

@hsluoyz
Copy link
Member

hsluoyz commented May 20, 2024

@mbierma fix CI errors:

image

@mbierma
Copy link
Contributor Author

mbierma commented May 20, 2024

@mbierma fix CI errors:

@hsluoyz should be good to go now

@leeqvip leeqvip merged commit 8aef43b into casbin:master May 21, 2024
30 checks passed
@hsluoyz
Copy link
Member

hsluoyz commented May 21, 2024

@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.

image

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))
Copy link

🎉 This PR is included in version 1.36.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@leeqvip
Copy link
Member

leeqvip commented May 21, 2024

Passed after re-run.

@hsluoyz
Copy link
Member

hsluoyz commented May 21, 2024

@leeqvip great!

@mbierma mbierma deleted the bugfix/faster-fast-enforcer branch May 21, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants