QUIQQER Translator import improvments - new batch import Feature
We implement a new Feature for QUIQQER - Translations
New Features
- What feature(s) did you add?
Allow batch import of packages locale XML-files
Related issue
Description
The translator is currently causing a lot of overhead while importing localization variables.
This includes, checking if the variable exists multiple times, inserting it and then executing an UPDATE query to process one localization variable.
As our localization files grow and we are issueing to many SQL-queries, we are adding even more overhead.
We want to implement a new feature to add all variables from one locale.xml file
as batch in a single SQL-Query.
By reducing the overhead we will increase the performance of our setup by a large amount.
Reasons
- Timeouts during setup process on slow machines
- Reducing overhead
- Performance
Steps to implement
- Add new method \QUI\Translator::batchImport()
- Read content of
locale.xml
- Build
INSERT IGNORE
Query for all locale variables.
Related issues
- quiqqer/qsetup#105 (Setup timeouts)
How did you implement it/them?
QUIQQER and the Translator have been extended with batch methods. As a result, all SQL queries were bundled and collected and sent as one query.
The complete push / commit history:
- feat: Added new method \QUI\Translator::batchImportFromPackage(). See quiqqer/package-translator#28
- fix: quiqqer/package-translator#28
- fix: quiqqer/package-translator#28
- feat: Added new method \QUI\Translator::batchImport(). See quiqqer/package-translator#28
As a result of this feature:
- The QUIQQER setup was 30 seconds faster.
- The SQL queries have been reduced by over 90%.
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Thank you!
Congratulations @pcsg-dev! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Click on any badge to view your own Board of Honor on SteemitBoard.
To support your work, I also upvoted your post!
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Hey @pcsg-dev I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x