Skip to content

Request history panel makes SQL panel log extra queries #18

Closed
@x-yuri

Description

@x-yuri

The issue here is that django-debug-toolbar first executes process_response method of every panel, then disables instrumentation, then runs generate_stats. With Request history panel, generate_stats is called when the former processes response, before instrumentation having been disabled.

As a part of generating stats Request panel records session data, which makes an SQL request. The request is recorded by SQL panel, since instrumentation has not yet been disabled. As a result in Debug toolbar I see "1 query in x ms." But when I open SQL panel I see no SQL queries. Supposedly because data for the panel are provided by Request history panel. And by the time Request History panel called generate_stats on SQL panel, no extra queries were executed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions