Lihz
V2EX  ›  Django

Django template.render 耗时过长的问题

  •  
  •   Lihz · Jul 18, 2017 · 4456 views
    This topic created in 3232 days ago, the information mentioned may be changed or developed.

    我是图

    • 如图,django admin 单个页面 10 条记录,sql 查询耗时 78.27ms,浏览器 request 阶段耗时 3000+ms,debug 了下,在 template.render 阶段耗时异常多。
    • 把 admin 参数 list_per_page 改成 100 后,这个阶段更是惨不忍睹,20s+,这究竟是什么鬼。。
    6 replies    2017-10-05 11:28:36 +08:00
    WildCat
        1
    WildCat  
       Jul 18, 2017
    楼主能歪个楼吗?这个 profiling 工具叫啥
    Lihz
        3
    Lihz  
    OP
       Jul 18, 2017   ❤️ 1
    @WildCat django-debug-toolbar
    Lihz
        4
    Lihz  
    OP
       Jul 18, 2017
    django-debug-toolbar 1.8 版本的锅,禁用后就正常了
    asuraa
        6
    asuraa  
       Oct 5, 2017
    楼主我遇到跟你一样的问题 但是禁用还是很慢。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2543 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 466ea39e · 40ms · UTC 15:58 · PVG 23:58 · LAX 08:58 · JFK 11:58
    ♥ Do have faith in what you're doing.