Skip to content

Conversation

@CarlSchwan
Copy link
Member

Currently, each field of the profile settings is fetching the account
information. This patch makes it so that only the first time do a DB call
and all the later ones are cached.

Reduce by 5 queries when loading the profile setting page and I suppose
other pages are affected since loading a page generates always fetch at
least once the account information to see if the profile feature is enabled
for the user.

@CarlSchwan CarlSchwan added the 3. to review Waiting for reviews label Apr 5, 2022
@CarlSchwan CarlSchwan self-assigned this Apr 5, 2022
Currently, each field of the profile settings is fetching the account
information. This patch makes it so that only the first time do a DB call
and all the later ones are cached.

Reduce by 5 queries when loading the profile setting page and I suppose
other pages are affected since loading a page generates always fetch at
least once the account information to see if the profile feature is enabled
for the user.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@skjnldsv skjnldsv merged commit fde178b into master Apr 5, 2022
@skjnldsv skjnldsv deleted the fix/cache-account branch April 5, 2022 19:38
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Apr 5, 2022
@blizzz blizzz mentioned this pull request Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants