{"issue":{"created_at":"2011-06-20T09:48:07Z","state":"open","updated_at":"2011-11-18T15:20:45Z","comments":41,"user":{"gravatar_id":"ede37d7f0de699859640529a4e793383","id":519889,"url":"https://api.github.com/users/protoror","login":"protoror","avatar_url":"https://secure.gravatar.com/avatar/ede37d7f0de699859640529a4e793383?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"after update radiant and nginx to 1.0.0rc2  сonnect to the server was over 6 second (site: www.termoteks.ru)\r\n\r\nProcessing SiteController#show_page (for 178.176.136.137 at 2011-06-20 11:32:31) [GET]\r\n  Parameters: {\"url\"=>[\"decor\", \"dvp-mdf\"], \"action\"=>\"show_page\", \"controller\"=>\"site\"}\r\nCompleted in 6437ms (DB: 42) | 200 [http://www.termoteks.ru/decor/dvp-mdf]\r\n\r\nin radiant 0.9.1 сonnect to the server was 300 millisecond (site: www.novoteks.org)\r\n\r\nserver VPS, memory 512mb REE, passenger, nginx\r\n\r\nwhat is wrong?","assignee":{"gravatar_id":"09477c358c5897d44121a248326e16d7","id":4271,"url":"https://api.github.com/users/saturnflyer","login":"saturnflyer","avatar_url":"https://secure.gravatar.com/avatar/09477c358c5897d44121a248326e16d7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"id":1083856,"number":234,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[{"name":"1.x","color":"fbffbd","url":"https://api.github.com/repos/radiant/radiant/labels/1.x"}],"title":"long wait connect server in 1.0.0rc2 (6 second)","closed_at":null,"html_url":"https://github.com/radiant/radiant/issues/234","milestone":{"created_at":"2011-04-10T00:58:29Z","state":"open","due_on":null,"closed_issues":20,"creator":{"gravatar_id":"09477c358c5897d44121a248326e16d7","id":4271,"url":"https://api.github.com/users/saturnflyer","login":"saturnflyer","avatar_url":"https://secure.gravatar.com/avatar/09477c358c5897d44121a248326e16d7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"number":5,"title":"1.0.0","description":"Final Rails 2.3 release","url":"https://api.github.com/repos/radiant/radiant/milestones/5","open_issues":1},"url":"https://api.github.com/repos/radiant/radiant/issues/234"},"action":"created","comment":{"created_at":"2011-11-18T15:20:45Z","updated_at":"2011-11-18T15:20:45Z","user":{"gravatar_id":"09477c358c5897d44121a248326e16d7","id":4271,"url":"https://api.github.com/users/saturnflyer","login":"saturnflyer","avatar_url":"https://secure.gravatar.com/avatar/09477c358c5897d44121a248326e16d7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Ah ha! That's really helpful. Thank you for tracking that down.\r\n\r\nI'm sad to report that this slowdown is likely my code. In sheets, you can separate your stylesheets into different concerns and include them all in one main stylesheet. For example\r\n\r\n    <r:stylesheet slug=\"colors.css\" />\r\n    <r:stylesheet slug=\"type.css\" />\r\n    <r:stylesheet slug=\"structure.css\" />\r\n\r\nThis single stylesheet would bring all of those together in one when rendered. The problem with this is that in previous versions you couldn't just edit `colors.css` and expect the entire thing to change. Now, you can, because the path generated for the main stylesheet uses an MD5 hash of the rendered content. So it will render to generate the link. That's the slowdown.\r\n\r\nI'd still like to keep this feature because it matches the user's expectation of making changes and actually seeing them (as opposed to needing to update the main stylesheet to have it regenerate) but there are 2 things than need to be done.\r\n \r\n1. I need to look into the caching for stylesheets to ensure that the browser is getting the proper headers to set local caching.\r\n2. I need to find a better way to ensure that the main stylesheet knows about changes in any included stylesheets.\r\n\r\nThis was something I knew I needed to address and had in the back of my head to do, but sadly didn't realize the impact until I got all of you caught up in what was my performance bottleneck.\r\n\r\nThanks everybody for making this an issue, and please accept my apology for introducing the problem. Now we know where it is and I can begin the work to simplify this.\r\n\r\nGiven that stylesheets do not change often and there are likely to be few of them, it may make sense to just do something simple like storing the rendered content in memory or some other separate caching mechanism.","id":2790237,"url":"https://api.github.com/repos/radiant/radiant/issues/comments/2790237"}}