{"action":"created","issue":{"url":"https://api.github.com/repos/spree/spree/issues/4340","labels_url":"https://api.github.com/repos/spree/spree/issues/4340/labels{/name}","comments_url":"https://api.github.com/repos/spree/spree/issues/4340/comments","events_url":"https://api.github.com/repos/spree/spree/issues/4340/events","html_url":"https://github.com/spree/spree/issues/4340","id":27552455,"number":4340,"title":"Improve orders#show n+1 queries","user":{"login":"athal7","id":467872,"avatar_url":"https://avatars.githubusercontent.com/u/467872?v=3","gravatar_id":"","url":"https://api.github.com/users/athal7","html_url":"https://github.com/athal7","followers_url":"https://api.github.com/users/athal7/followers","following_url":"https://api.github.com/users/athal7/following{/other_user}","gists_url":"https://api.github.com/users/athal7/gists{/gist_id}","starred_url":"https://api.github.com/users/athal7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/athal7/subscriptions","organizations_url":"https://api.github.com/users/athal7/orgs","repos_url":"https://api.github.com/users/athal7/repos","events_url":"https://api.github.com/users/athal7/events{/privacy}","received_events_url":"https://api.github.com/users/athal7/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spree/spree/labels/stalled","name":"stalled","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/spree/spree/milestones/27","labels_url":"https://api.github.com/repos/spree/spree/milestones/27/labels","id":709927,"number":27,"title":"v3.0.0","description":"","creator":{"login":"JDutil","id":25104,"avatar_url":"https://avatars.githubusercontent.com/u/25104?v=3","gravatar_id":"","url":"https://api.github.com/users/JDutil","html_url":"https://github.com/JDutil","followers_url":"https://api.github.com/users/JDutil/followers","following_url":"https://api.github.com/users/JDutil/following{/other_user}","gists_url":"https://api.github.com/users/JDutil/gists{/gist_id}","starred_url":"https://api.github.com/users/JDutil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JDutil/subscriptions","organizations_url":"https://api.github.com/users/JDutil/orgs","repos_url":"https://api.github.com/users/JDutil/repos","events_url":"https://api.github.com/users/JDutil/events{/privacy}","received_events_url":"https://api.github.com/users/JDutil/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":16,"state":"open","created_at":"2014-07-03T22:04:28Z","updated_at":"2015-01-09T19:07:34Z","due_on":"2025-07-31T07:00:00Z","closed_at":null},"comments":10,"created_at":"2014-02-13T21:07:47Z","updated_at":"2015-01-09T19:07:34Z","closed_at":"2015-01-09T19:07:34Z","body":"Currently there are many n+1 queries that are generated by the orders#show rabl template (which is also called through the orders/mine route). After playing with it for a while, this blend of eager loaded associations squash most of the queries, though there must be a better way (maybe more minimal representations at times)?\r\n\r\n```ruby\r\n{payments: :payment_method}, {line_items: {variant:\r\n[:product, :default_price, :images_for_variant, {option_values: :option_type}]}},\r\n:tokenized_permission, { ship_address: [:country, :state] },\r\n{bill_address: [:country, :state] },{ shipments: [:order, :stock_location, {\r\nshipping_rates: [{shipment: :adjustment}, { shipping_method: [:zones, :shipping_categories]}]}]}\r\n```"},"comment":{"url":"https://api.github.com/repos/spree/spree/issues/comments/69382324","html_url":"https://github.com/spree/spree/issues/4340#issuecomment-69382324","issue_url":"https://api.github.com/repos/spree/spree/issues/4340","id":69382324,"user":{"login":"spreebot","id":10061386,"avatar_url":"https://avatars.githubusercontent.com/u/10061386?v=3","gravatar_id":"","url":"https://api.github.com/users/spreebot","html_url":"https://github.com/spreebot","followers_url":"https://api.github.com/users/spreebot/followers","following_url":"https://api.github.com/users/spreebot/following{/other_user}","gists_url":"https://api.github.com/users/spreebot/gists{/gist_id}","starred_url":"https://api.github.com/users/spreebot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spreebot/subscriptions","organizations_url":"https://api.github.com/users/spreebot/orgs","repos_url":"https://api.github.com/users/spreebot/repos","events_url":"https://api.github.com/users/spreebot/events{/privacy}","received_events_url":"https://api.github.com/users/spreebot/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T19:07:34Z","updated_at":"2015-01-09T19:07:34Z","body":"This issue has been open for 14 days without actionable information or activity and will be marked as “stalled” and closed. Please re-open with the information requested.\n\nDon't get discouraged that your issue has been closed, Spree is a busy project and gets a lot of issues so we need your help to make sure this issue contains all the information required. Please review [our guidelines](http://dev.spreecommerce.com/issues#reporting-requirements) on how to submit an issue.\n"}}