Problem/Motivation
devel_query_table()
does a beautiful job of formatting the query log, and offering "placeholder / argument / EXPLAIN" links. Unfortunately it cannot be called more than once per page, because the request ID is stored in the global Drupal.settings variable.
Being able to reuse this function would be super useful for fine-grained performance metrics, especially in light of DBTNG's Database::getLog
function (which can capture more than one log simultaneously). An example would be logging the queries run inside a particular panel pane.
Proposed resolution
Only a very small change is needed - the request ID is stored as a DOM attribute, instead of a global variable.
Remaining tasks
Patch needs review.
User interface changes
N/A
API changes
N/A
Comment | File | Size | Author |
---|---|---|---|
#1 | Screen Shot 2014-04-24 at 6.16.03 PM.png | 91.3 KB | grendzy |
devel_query_table.patch | 2.83 KB | grendzy | |
Comments
Comment #1
grendzy CreditAttribution: grendzy commentedHere's an example screenshot of using devel_query_table to measure a view (testing while working on #2191287: checkbox for "Show other queries run during render" does nothing ).
Comment #2
pcambraLooks good, could we have this D8 first please?
Comment #3
willzyx CreditAttribution: willzyx commenteddevel_query_table() no longer exists in the 8.x branch. Moved to 7.x queque
Comment #4
willzyx CreditAttribution: willzyx commentedClosing for lack of activity. Feel free to reopen if the issue still exists