Skip to content

Bar: ignore pannels#388

Open
krajcikondra wants to merge 18 commits intonette:masterfrom
krajcikondra:master
Open

Bar: ignore pannels#388
krajcikondra wants to merge 18 commits intonette:masterfrom
krajcikondra:master

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
@dg dg force-pushed the master branch 28 times, most recently from 5682743 to 22f3d56 Compare April 30, 2020 16:12
@dg dg force-pushed the master branch 2 times, most recently from 94e7531 to 2199b3b Compare May 5, 2020 08:15
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