• Markus Koller's avatar
    Show only personal snippets on explore page · f4ea1753
    Markus Koller authored
    The "Explore snippets" page loads very slowly with a large number of
    snippets, due to the complexity of the authorization checks for project
    snippets.
    
    Since project snippets are of limited interest on the explore page, we
    can restrict the query to personal snippets which are visible to the
    current user.
    
    We're also replacing the index on `snippets.project_id` with a combined
    index on `(project_id, visibility_level)` to further speed up these
    queries.
    f4ea1753
snippet_spec.rb 15.3 KB