{"action":"closed","issue":{"url":"https://api.github.com/repos/django/channels/issues/1121","repository_url":"https://api.github.com/repos/django/channels","labels_url":"https://api.github.com/repos/django/channels/issues/1121/labels{/name}","comments_url":"https://api.github.com/repos/django/channels/issues/1121/comments","events_url":"https://api.github.com/repos/django/channels/issues/1121/events","html_url":"https://github.com/django/channels/issues/1121","id":349753394,"node_id":"MDU6SXNzdWUzNDk3NTMzOTQ=","number":1121,"title":"Performance drop when using Channels 2 with WhitenoiseMiddleware","user":{"login":"OndrejSkalicka","id":3762385,"node_id":"MDQ6VXNlcjM3NjIzODU=","avatar_url":"https://avatars0.githubusercontent.com/u/3762385?v=4","gravatar_id":"","url":"https://api.github.com/users/OndrejSkalicka","html_url":"https://github.com/OndrejSkalicka","followers_url":"https://api.github.com/users/OndrejSkalicka/followers","following_url":"https://api.github.com/users/OndrejSkalicka/following{/other_user}","gists_url":"https://api.github.com/users/OndrejSkalicka/gists{/gist_id}","starred_url":"https://api.github.com/users/OndrejSkalicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OndrejSkalicka/subscriptions","organizations_url":"https://api.github.com/users/OndrejSkalicka/orgs","repos_url":"https://api.github.com/users/OndrejSkalicka/repos","events_url":"https://api.github.com/users/OndrejSkalicka/events{/privacy}","received_events_url":"https://api.github.com/users/OndrejSkalicka/received_events","type":"User","site_admin":false},"labels":[{"id":220071670,"node_id":"MDU6TGFiZWwyMjAwNzE2NzA=","url":"https://api.github.com/repos/django/channels/labels/bug","name":"bug","color":"fc2929","default":true},{"id":431300069,"node_id":"MDU6TGFiZWw0MzEzMDAwNjk=","url":"https://api.github.com/repos/django/channels/labels/exp/intermediate","name":"exp/intermediate","color":"bfdadc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-08-11T18:14:02Z","updated_at":"2018-09-04T12:26:04Z","closed_at":"2018-09-04T12:26:04Z","author_association":"NONE","body":"I've just upgraded my Django project's Channels from 1.x to 2.x (there seems to be an issue with 1.x that it creates new session for every connection), replacing my wsgi application with an asgi one + all other changes required by docs. \r\n\r\nAfter that, my response time for pure-html pages dropped from ~20ms to about 400ms. (I've tested on a real simple one, next to no db involved, no javascript evaluated)\r\n\r\nI've fiddled with settings and found out that when I disable `whitenoise.middleware.WhiteNoiseMiddleware` , response times are back to normal. (both `whitenoise==4.0` and `whitenoise==3.3.1`)\r\n\r\nIn Channels 1.x, inclusion / exclusion did not seem to make an impact (not measurable anyways). \r\n\r\nI run the project using simple `python manage.py runserver`, but using `daphne` produces same results.\r\n\r\nWhen I tried to add some logging to the middleware itself, it seems like the `__call__` itself is not performing bad (around 10ms), but the performance drop is roughly dependent on number of static files.\r\n\r\nI'm still in process of stripping my project to some bare version that I'm able to send (it's rather big now)."}}
{"actor":{"display_login":"andrewgodwin"}}