未来可能的改进方向 #104
Pinned
YDX-2147483647
started this conversation in
Ideas
未来可能的改进方向
#104
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
https://slimsaas.com/blog/django-scaling-performance/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
性能
开发时没有注意查询数据库与访问内存的开销差异,估计存在很多无用查询。Debug toolbar 提供了这方面调试功能。
contest-bitnp/contest/quiz/views.py
Lines 161 to 164 in 46afe34
AnswerInline
需要好几十次数据库查询。Admin 有些页面还出现了 1666 queries including 1663 similar and 1216 duplicates。ModelAdmin.list_select_related
似乎有用。#151
Student
目前
Student
几乎没有用,反而要自己验证User
。也许能用 Django 内置的 permissions 处理。对表
目前来看,传输时间较小,而服务器、客户端的表差约十秒。可通过传服务器时间对表解决。
另外,后收到的答题请求可能是先发出的,这时要忽略。
#119
Beta Was this translation helpful? Give feedback.
All reactions