diff options
| author | Gareth Rees <gareth@mysociety.org> | 2015-04-20 15:59:35 +0100 |
|---|---|---|
| committer | Gareth Rees <gareth@mysociety.org> | 2015-05-07 15:08:59 +0100 |
| commit | 232ea2d14878f270afaa5e781e154d9cf4592a64 (patch) | |
| tree | 36f5fe0a0e65e6dc1e3794cb0f46289a5f627c64 /config | |
| parent | 63f65e7b75c1d5eb85c6176b0c79ffeda0257a13 (diff) | |
Add bullet
Help to kill N+1 queries and unused eager loading
Diffstat (limited to 'config')
| -rw-r--r-- | config/environments/development.rb | 8 | ||||
| -rw-r--r-- | config/general.yml-example | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb index dbf8d7b2a..b334a1e19 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -46,4 +46,12 @@ Alaveteli::Application.configure do # with SQLite, MySQL, and PostgreSQL) config.active_record.auto_explain_threshold_in_seconds = 0.5 + if AlaveteliConfiguration.use_bullet_in_development + config.after_initialize do + Bullet.enable = true + Bullet.bullet_logger = true + Bullet.console = true + Bullet.add_footer = true + end + end end diff --git a/config/general.yml-example b/config/general.yml-example index df140136c..a6980b71c 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -673,6 +673,14 @@ PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE: false # --- USE_MAILCATCHER_IN_DEVELOPMENT: true +# Bullet is a tool to help to kill N+1 queries and unused eager loading +# https://github.com/flyerhzm/bullet +# +# USE_BULLET_IN_DEVELOPMENT - Boolean (default: false) +# +# --- +USE_BULLET_IN_DEVELOPMENT: false + # Use memcached to cache HTML fragments for better performance. This will # only have an effect in environments where # config.action_controller.perform_caching is set to true |
