Commit f7dd4a82c868cfb5fcaf9e012c0addaeb2d9aa26
Exists in
master
and in
1 other branch
Merge pull request #433 from iFixit/performance-improvements
Huge Performance Improvements
Showing
6 changed files
with
9 additions
and
2 deletions
Show diff stats
app/controllers/api/v1/stats_controller.rb
... | ... | @@ -13,7 +13,7 @@ class Api::V1::StatsController < ApplicationController |
13 | 13 | stats = { |
14 | 14 | :name => @app.name, |
15 | 15 | :last_error_time => @last_error_time, |
16 | - :unresolved_errors => @app.problems.unresolved.count | |
16 | + :unresolved_errors => @app.unresolved_count | |
17 | 17 | } |
18 | 18 | |
19 | 19 | respond_to do |format| | ... | ... |
app/models/app.rb
config/application.rb
... | ... | @@ -48,6 +48,9 @@ module Errbit |
48 | 48 | g.fixture_replacement :fabrication |
49 | 49 | end |
50 | 50 | |
51 | + # Enable the mongoid identity map for performance | |
52 | + Mongoid.identity_map_enabled = true | |
53 | + | |
51 | 54 | # IssueTracker subclasses use inheritance, so preloading models provides querying consistency in dev mode. |
52 | 55 | config.mongoid.preload_models = true |
53 | 56 | ... | ... |
config/mongoid.example.yml
config/mongoid.mongohq.yml
config/mongoid.mongolab.yml