It uses the doctrine entity manager repository to get items and uses the entity manager persist flush actions each round on a foreach. This causes delays and memory exhaustion and slow processes.
To optimize this we can use the query builder of doctrine to insert or update when necessary. Listeners who listen to persist and flush are not called anymore. The unit of work is not calculated anymore. So Insert and update queries would make the load messages lightning fast.
The load command is too expensive on resources.
It uses the doctrine entity manager repository to get items and uses the entity manager persist flush actions each round on a foreach. This causes delays and memory exhaustion and slow processes.
To optimize this we can use the query builder of doctrine to insert or update when necessary. Listeners who listen to persist and flush are not called anymore. The unit of work is not calculated anymore. So Insert and update queries would make the load messages lightning fast.