zicht / messages-bundle

Library - ZichtMessagesBundle - Edit your translations in the database
MIT License
1 stars 0 forks source link

load command too expensive with recources #7

Closed muhammedeminakbulut closed 7 years ago

muhammedeminakbulut commented 7 years ago

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.

boudewijn-zicht commented 7 years ago

Performance issues when loading all messages into the database have been fixed in version 2.5.4.