Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !2453

Closed
Created Jan 01, 2013 by Administrator@rootOwner
  • Report abuse
Report abuse

Cache event fragments and hence increase performance

  • Overview 2
  • Commits 1
  • Changes 2

Created by: jirutka

Dashboard page and project’s main pages are very slow due to events. It’s not so expensive to load events itself, but all their associations to generate event view. However, events represents history of project’s activity and thus they’re practically* immutable. So why not cache them? I mean cache fragment of single event under time ago (see _event.html.haml).

It’s practically one line change, but reduce load time of pages with events avg. 2 times (when all events are already cached)!

* I think that we can consider event itself as immutable, but not some of its associations, e.g. user can change his name or change project’s name. However, these situations are quite rare and it’s not so big deal as events are “history”. Therefore I don’t even care about invalidation of these fragments. If anyone does, we can add some invalidation observers.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/jirutka/cache-events