I'm working on increasing fractal performance in lognrunning application.
Not to setCurrentScope
First step is to make Transformer immutable. We must not set current scope to Transformer. This will give us opportunity to store transformers in service container. Scope should be passed to each transform or includeSomething method as argument.
public function transform(array $data, ScopeInterface $scope): array
{
// magic here
}
public function includeSomethingarray $data, ParamBag $p, ScopeInterface $scope): array
{
// magic here
}
TransformerAbstract should be removed.
User must construct his own Transformer class.
Now TransformerAbstract looks like
abstract class TransformerAbstract implements HasIncludesInterface, ScopeAwareInterface
{
use HasIncludesTrait;
use IncludeMethodBuildTrait;
use ResourceCreateTrait;
use ScopeAwareTrait;
}
For example User can make he`s own lightweight Transformer without includes. It will be a little faster because we do not spend time on figure out what to include.
abstract class MyAbstracttransformer
{
use IncludeMethodBuildTrait;
use ResourceCreateTrait;
}
Any mention of TransformerAbstract has been removed from Scope.
I'm working on increasing fractal performance in lognrunning application.
Not to setCurrentScope
First step is to make
Transformer
immutable. We must not set current scope to Transformer. This will give us opportunity to store transformers in service container. Scope should be passed to eachtransform
orincludeSomething
method as argument.TransformerAbstract should be removed.
User must construct his own Transformer class.
Now TransformerAbstract looks like
For example User can make he`s own lightweight Transformer without includes. It will be a little faster because we do not spend time on figure out what to include.
Any mention of TransformerAbstract has been removed from Scope.
Also