开发者

Django dev server slowness with chrome + other instance / browser

开发者 https://www.devze.com 2023-03-14 17:13 出处:网络
First let me say that this is not about production settings for django - it\'s for local development and testing.

First let me say that this is not about production settings for django - it's for local development and testing.

I'm testing out multiple user scenarios, requiring I log in as several different users. I'm logged in as user A using Chrome, and user B using Chrome's incognito mode, and as user C using Firefox. I'm using "manage.py runserver" to run the dev server.

The first instance with regular Chrome (user A) works well and is fast. The other instances are very slow - perhaps better described as stuck. They sit around doing nothing for 10-30 seconds, and then finally display the page fairly quickly.

While the other browsers are stuck I can go to the first one (user A) and click around and it works 开发者_运维技巧well and is fast. In other words only the requests from the other two instances get stuck - the first instance always works well.

The resource that's slow appears to be the html page, not the static content.

The backend is Django 1.1.1 with SQLite as the database running on OS X 1.6.7 .

Any ideas? Is Chrome doing something special to hog the connection?


This could be a known issue "Development web server sometimes hangs with Chrome":

https://code.djangoproject.com/ticket/16099

It is fixed recenty in django trunk:

https://code.djangoproject.com/changeset/16427

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号