Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bar: ignore pannels #388

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Bar: ignore pannels #388

wants to merge 18 commits into from

Conversation

krajcikondra
Copy link

Feature:

I am using a lot of nette extensions which automatically add panel to \Tracy\Bar. I found out that in production mode is my application faster.

With my changes it is possible ignore rendering of unnecessary pannels and make application faster.

In bootstrap.php:

\Tracy\Debugger::getBar()->ignorePanel('Kdyby\RabbitMq\Diagnostics\Panel'); \Tracy\Debugger::getBar()->ignorePanel('Instante\Tracy\Login\DebugLogin'); \Tracy\Debugger::getBar()->ignorePanel('Nette\Bridges\SecurityTracy\UserPanel'); \Tracy\Debugger::getBar()->ignorePanel('Nette\Bridges\ApplicationTracy\RoutingPanel'); \Tracy\Debugger::getBar()->ignorePanel('kdyby.translation'); \Tracy\Debugger::getBar()->ignorePanel('Kdyby\Redis\Diagnostics\Panel'); \Tracy\Debugger::getBar()->ignorePanel('Nette\Bridges\DatabaseTracy\ConnectionPanel'); \Tracy\Debugger::getBar()->ignorePanel('Nette\Bridges\DITracy\ContainerPanel'); \Tracy\Debugger::getBar()->ignorePanel('Kdyby\Events\Diagnostics\Panel'); \Tracy\Debugger::getBar()->ignorePanel('Tracy:errors'); \Tracy\Debugger::getBar()->ignorePanel('Tracy:info');

@mabar
Copy link
Contributor

mabar commented Sep 24, 2019

Are you sure that rendering is slow? Because debug panels usually make some computations which may occur before render. Also DI extensions which add debug panels usually have debug or debug.panel option with which can be panel disabled

@dg dg force-pushed the master branch 2 times, most recently from dbabb37 to eb2e772 Compare September 24, 2019 11:11
@krajcikondra
Copy link
Author

krajcikondra commented Sep 24, 2019

Are you sure that rendering is slow? Because debug panels usually make some computations which may occur before render. Also DI extensions which add debug panels usually have debug or debug.panel option with which can be panel disabled

Yes I am sure. If I remove all panels from tracy then application is really very faster.

You are right. All extensions which I use, have debugger option. If I set debugger to false the panel is disabled.

redis:
    debugger: false

routing:
    debugger: false

session:
    debugger: false

events:
    debugger: false

translation:
    debugger: false

database:
    default:
        debugger: false

di:
    debugger: false

security:
    debugger: false

But I dont know how remove panel with Execution time and composer packages. It is possible?

@dg dg force-pushed the master branch 6 times, most recently from de3ad52 to 191c0d2 Compare December 15, 2019 22:49
@dg dg force-pushed the master branch 2 times, most recently from 2b958bb to f36b649 Compare January 2, 2020 19:40
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.

4 participants