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

Disable DataCollectorPlugin #66

Open
enumag opened this issue Mar 12, 2018 · 1 comment
Open

Disable DataCollectorPlugin #66

enumag opened this issue Mar 12, 2018 · 1 comment

Comments

@enumag
Copy link
Member

enumag commented Mar 12, 2018

For some reason the DataCollectorPlugin slows the performance of my import by roughly 100%. According to blackfire.io the plugin greatly increases time used by garbage collector. I don't care why that happens since I don't really need the plugin.

I obviously can't set kernel.debug to false since I want to see errors. And I can't uninstall symfony/stopwatch either since it is required by friendsofphp/php-cs-fixer. So I need some other way to disable this plugin. How can I do that?

@enumag
Copy link
Member Author

enumag commented Mar 12, 2018

For now I'm using this workaround but there should be some other way in my opinion.

services:
    prooph_service_bus.plugin.data_collector:
        class: App\Library\Prooph\Infrastructure\NullPlugin
<?php declare(strict_types = 1);

namespace App\Library\Prooph\Infrastructure;

use Prooph\ServiceBus\MessageBus;
use Prooph\ServiceBus\Plugin\Plugin;

class NullPlugin implements Plugin
{
	public function attachToMessageBus(MessageBus $messageBus): void
	{
	}

	public function detachFromMessageBus(MessageBus $messageBus): void
	{
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants