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

Remove navbar cache #1849

Merged
merged 3 commits into from
Jan 16, 2023
Merged

Conversation

richardebeling
Copy link
Member

Removes the navbar cache.

Should thus fix #1645. Increases page load times by ~20ms. I tried

  1. just fetching semesters from the DB once instead of twice with different filters (still in this PR)
  2. prefetching the groups of request.user to allow the privilege-checks to happen without database hits.

Both didn't really change much about the performance. At 40-60ms to render a static view, the effects of removing singular db hits is really hard to qualify. I left the semester logic in, as it is contained, and reverted the user profile groups stuff, as prefetching is a bit tricky to do there: We only want it for request.user and not for other users, and ideally, we'd want it directly during initial creation of the object (and not later annotated by a middleware).

Copy link
Member

@niklasmohrin niklasmohrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@richardebeling richardebeling merged commit e29cb47 into e-valuation:main Jan 16, 2023
@richardebeling richardebeling deleted the navbar-cache branch January 16, 2023 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

The navbar cache is at it again: CSRF super rude failure
3 participants