Django开发服务器CPU密集型 - 如何分析? [英] Django development server CPU intensive - how to analyse?

查看:179
本文介绍了Django开发服务器CPU密集型 - 如何分析?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到我的本地Windows7机器上的django开发服务器(版本1.1.1)正在使用很多CPU(根据任务管理器的python.exe条目,占用大约30%),即使在空闲状态,即没有请求进/出有没有一种既定的分析方法来分析可能负责的内容?



谢谢!



Martin

解决方案

FWIW,你应该做分析,但是当你做我会打赌,你会发现答案是轮询您的更改文件,以便它可以自动重新加载。您可以使用python manage.py runserver --noreload进行快速测试,并了解它如何影响CPU使用率。


I'm noticing that my django development server (version 1.1.1) on my local windows7 machine is using a lot of CPU (~30%, according to task manager's python.exe entry), even in idle state, i.e. no request coming in/going out. Is there an established way of analysing what might be responsible for this?

Thanks!

Martin

解决方案

FWIW, you should do the profiling, but when you do I'll bet you find that the answer is "polling for changes to your files so it can auto-reload." You might do a quick test with "python manage.py runserver --noreload" and see how that affects the CPU usage.

这篇关于Django开发服务器CPU密集型 - 如何分析?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆