There are a few checks that disable data collecting:
|
$this->skipCollect = true; |
|
$this->skipCollect = true; |
But they do not unwrap proxied classes, like \Yiisoft\Yii\Debug\Collector\LoggerInterfaceProxy or any other.
Also they do not unsubscribe from event-dispatcher.
It may negatively impact performance.
An idea to control if data collecting is skipped:
- Create a proxy class for
*InterfaceProxy classes
- All
*InterfaceProxy must expose decorated class
- If data collecting is skipped, call
$proxy->getDecorated()->$method($args) directly
- Otherwise call
$proxy->$method($args)
Or add check is data collecting is skipped to each public method of proxy classes
There are a few checks that disable data collecting:
yii-debug/src/Debugger.php
Line 43 in cd4fe68
yii-debug/src/Debugger.php
Line 48 in cd4fe68
But they do not unwrap proxied classes, like
\Yiisoft\Yii\Debug\Collector\LoggerInterfaceProxyor any other.Also they do not unsubscribe from event-dispatcher.
It may negatively impact performance.
An idea to control if data collecting is skipped:
*InterfaceProxyclasses*InterfaceProxymust expose decorated class$proxy->getDecorated()->$method($args)directly$proxy->$method($args)Or add check
is data collecting is skippedto each public method of proxy classes