Dashboard Loads Slowly With Many Projects
Created by: mutewinter
The reason the load is slow is because of the following code
class DashboardController < ApplicationController
...
def index
@projects = current_user.projects.all
@active_projects = @projects.select(&:last_activity_date).sort_by(&:last_activity_date).reverse
...
With 185 projects in the database, this operation takes about 5 - 10 seconds to load. Caching the last_activity_date in the projects model would be one fix for this.