{"comment":{"url":"https://api.github.com/repos/justingaylor/praxis/comments/9291468","html_url":"https://github.com/justingaylor/praxis/commit/bb841e3c330b9ce2c4df6dd60c49132157597aeb#commitcomment-9291468","id":9291468,"user":{"login":"blanquer","id":33885,"avatar_url":"https://avatars.githubusercontent.com/u/33885?v=3","gravatar_id":"","url":"https://api.github.com/users/blanquer","html_url":"https://github.com/blanquer","followers_url":"https://api.github.com/users/blanquer/followers","following_url":"https://api.github.com/users/blanquer/following{/other_user}","gists_url":"https://api.github.com/users/blanquer/gists{/gist_id}","starred_url":"https://api.github.com/users/blanquer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blanquer/subscriptions","organizations_url":"https://api.github.com/users/blanquer/orgs","repos_url":"https://api.github.com/users/blanquer/repos","events_url":"https://api.github.com/users/blanquer/events{/privacy}","received_events_url":"https://api.github.com/users/blanquer/received_events","type":"User","site_admin":false},"position":89,"line":106,"path":"lib/praxis/plugins/praxis_mapper_plugin.rb","commit_id":"bb841e3c330b9ce2c4df6dd60c49132157597aeb","created_at":"2015-01-15T04:38:57Z","updated_at":"2015-01-15T04:38:57Z","body":"ya, I missed that part of the code. \r\nHowever I think that what would be best to do (performance-wise) is to avoid registering the callback altogether if the log_stats is 'skip'\r\nAt the same time, I would add a 2nd parameter to the Statistics.log call and set that in the callback, so that the string doesn't need to be resolved from the config everytime.\r\nSomething like this:\r\n\r\n```ruby\r\nunless PraxisMapperPlugin::Plugin.instance.config.log_stats == 'skip'\r\n\r\n    Praxis::Notifications.subscribe 'praxis.request.all' do |name, *junk, payload|\r\n        if (identity_map = payload[:request].identity_map)\r\n            PraxisMapperPlugin::Statistics.log(identity_map,\r\n                                                 PraxisMapperPlugin::Plugin.instance.config.log_stats )\r\n        end\r\n    end\r\nend\r\n```\r\n\r\nhope all this makes sense"}}