Skip to content

cache loginName2UserName and cover the method with unit tests#1643

Merged
MorrisJobke merged 2 commits intomasterfrom
ldap_more_caching
Oct 7, 2016
Merged

cache loginName2UserName and cover the method with unit tests#1643
MorrisJobke merged 2 commits intomasterfrom
ldap_more_caching

Conversation

@blizzz
Copy link
Member

@blizzz blizzz commented Oct 6, 2016

@LukasReschke saw a code path that was talking to LDAP on any request. Turns out, it did not cache the result. Covered by unit tests, please review. @nextcloud/ldap

blizzz added 2 commits October 6, 2016 22:53
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@mention-bot
Copy link

@blizzz, thanks for your PR! By analyzing the history of the files in this pull request, we identified @nickvergessen, @invalid-email-address and @butonic to be potential reviewers.

@blizzz
Copy link
Member Author

blizzz commented Oct 6, 2016

Somehow I cannot assingn the milestone?!

@LukasReschke
Copy link
Member

Somehow I cannot assingn the milestone?!

Me neither…

@rullzer
Copy link
Member

rullzer commented Oct 7, 2016

Does the trick for me!
LGTM!

@MorrisJobke
Copy link
Member

Tested and works for me 👍

@MorrisJobke MorrisJobke merged commit 7264d20 into master Oct 7, 2016
@MorrisJobke MorrisJobke deleted the ldap_more_caching branch October 7, 2016 07:38
@blizzz
Copy link
Member Author

blizzz commented Oct 7, 2016

A candidate for backporting. Not a serious issue, but fixing the missing caching for that method brings cyber-performance benefits. @karlitschek

@LukasReschke
Copy link
Member

LukasReschke commented Oct 7, 2016

To put it in numbers: Without that nearly every request takes 470ms longer on cloud.nextcloud.com because it does quite some LDAP queries. 🙈

@LukasReschke
Copy link
Member

@karlitschek
Copy link
Member

👍

blizzz added a commit that referenced this pull request Oct 7, 2016
get rid of test warnings

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>

cache loginName2UserName and cover the method with unit tests

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>

adjust tests

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@blizzz
Copy link
Member Author

blizzz commented Oct 7, 2016

Backport is here: #1654

blizzz added a commit that referenced this pull request Oct 7, 2016
get rid of test warnings

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>

cache loginName2UserName and cover the method with unit tests

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>

adjust tests

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@MorrisJobke MorrisJobke modified the milestone: Nextcloud 11.0 Oct 8, 2016
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.

6 participants