QUIQQER Translator import improvments - new batch import Feature

in #utopian-io8 years ago (edited)

We implement a new Feature for QUIQQER - Translations

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:

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

Sort:  

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) :

Award for the number of upvotes

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

Upvote this notification to help all Steemit users. Learn why here!

Hey @pcsg-dev I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

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

Coin Marketplace

STEEM 0.12
TRX 0.34
JST 0.033
BTC 121461.64
ETH 4451.11
BNB 1310.36
SBD 0.77