Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Security] Make AccessDecisionManager much faster#49670

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@Nyholm
Copy link
Member

QA
Branch?6.3
Bug fix?no
New feature?no
Deprecations?no
Tickets
LicenseMIT
Doc PR

When you are using a lot of voters, you need better caching. With inspiration from#43066 by@jderusse I managed to squeeze some more performance from theAccessDecisionManager.

I do about 7000 calls toAccessDecisionManager::getVoters(). It takes me 369ms.
With this PR, it takes about 30ms.

The trick is that I don't loop over all Voters all the time. If I seen the object and attribute before then I just returns the voters I previously calculated.


Performance:

When do benchmark on an application with 40 voters I got:

MetricFromTo
Wall time1150ms859 ms
I/O Wait135 ms154 ms
CPU1020ms705 ms
Memory11.8 MB12.9 MB

I would love a few more set of eyes on this PR.

@Nyholm
Copy link
MemberAuthor

I spent 3 hours last night considering if I should make this PR or not.
I had this feeling that something wasn't right.. This fix was "too simple" for@jderusse or anyone else to miss.

I slept on it but still couldn't understand the why I got so massive performance gain... It turns out that I had xdebug on while debugging 🤦🏽

When I re-ran the profiles it turns out they are pretty much the same. I dont think this complexity is worth the almost non existent gain.

@NyholmNyholm closed thisMar 11, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@wouterjwouterjAwaiting requested review from wouterj

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

6.3

Development

Successfully merging this pull request may close these issues.

2 participants

@Nyholm@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp