peatio
peatio copied to clipboard
Performance of initial HTTP GET is not great
When are I restart my containers, the first HTTP GET to / takes long to return. It appears as if there are some blocking DB reads. Do we have to do the reads synchronously?
peatio_1 | Started GET "/" for 172.18.0.13 at 2018-04-01 23:30:43 +0000
peatio_1 | Processing by WelcomeController#index as HTML
peatio_1 | Member Load (0.6ms) SELECT `members`.* FROM `members` WHERE `members`.`disabled` = 0 AND `members`.`id` = 3 ORDER BY `members`.`id` ASC LIMIT 1
peatio_1 | Currency Load (0.6ms) SELECT `currencies`.* FROM `currencies` WHERE `currencies`.`visible` = 1
peatio_1 | Currency Load (0.7ms) SELECT `currencies`.* FROM `currencies` WHERE `currencies`.`type` = 'fiat' ORDER BY `currencies`.`id` ASC LIMIT 1
peatio_1 | Account Load (0.6ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`member_id` = 3
peatio_1 | Currency Load (0.6ms) SELECT `currencies`.* FROM `currencies` WHERE `currencies`.`id` = 1 LIMIT 1
peatio_1 | Currency Load (0.7ms) SELECT `currencies`.* FROM `currencies` WHERE `currencies`.`id` = 2 LIMIT 1
peatio_1 | Currency Load (0.6ms) SELECT `currencies`.* FROM `currencies` WHERE `currencies`.`id` = 3 LIMIT 1
peatio_1 | Rendered welcome/index.html.erb within layouts/landing (14.7ms)
peatio_1 | Rendered shared/_meta.html.erb (0.1ms)
peatio_1 | Rendered shared/_sentry.html.erb (0.1ms)
peatio_1 | Rendered shared/_theme.html.erb (7.6ms)
peatio_1 | Rendered shared/_html5.html.erb (27.6ms)
peatio_1 | Rendered shared/_alert.html.erb (0.3ms)
peatio_1 | Rendered shared/_footer.html.erb (0.1ms)
peatio_1 | Completed 200 OK in 472ms (Views: 443.2ms | ActiveRecord: 4.4ms)
Actually the DB reads are quick but there is a hold up somewhere. Perhaps it's my environment?
@nchigwamba Hi
This is normal behaviour since it is required to lazy load many things, initialize libraries, compile ERB templates, and lot of stuff. In case of development env it takes much more time because of Sprockets.