Skip to content

Conversation

elpete
Copy link
Contributor

@elpete elpete commented May 3, 2020

This PR adds a qb and Quick panel to the cbdebugger. It is on by default if qb is installed a registered. The Quick sections of the panel are only shown if Quick is also installed.

The panels show all the queries executed by qb. It includes a total count, table by timestamp, and a grouped table to show if you repeatedly execute the same kind of query. The information includes the timestamp the code was ran at, the query that was run, the total execution time (time for queryExecute to run and come back), and any bindings associated with the query. This panel can help identify N+1 issues and slow queries. Hopefully in the future we can include some sort of backtrace (assuming we can do it in a performant manner).

The Quick section shows the number of loaded entities as this can be a sign that you are loading far more entities than you knew, for instance loading all the logins for a User just to display a latestLogin timestamp.

Here's a screenshot showing both sections:

image

It would have been ideal for these to be added as some sort of modular set up that let modules contribute panels. Unfortunately, there's just not time to tackle that right now. The benefits that this panel will provide, specifically, is too valuable to make wait for that modular future.

@lmajano lmajano merged commit c4035ef into development May 4, 2020
@lmajano lmajano deleted the add_qb_and_quick branch June 5, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants