Details
-
Improvement
-
Resolution: Fixed
-
None
-
High
-
IMPROVEMENT: InstantTranslate requests the attached Resources individually from the Frontend to bring request-times down
-
Empty show more show less
Description
InstantTranslate should requests the attached Language-Resources individually from the Frontend instead in a Loop in the Backend to bring request-times down
- the requires adding the LR config to the frontend
- The rules for the Requests are as with one single request: The LR-requests for a single LR must not overlap, one after the other (but different LRs are requested in parallel)
- The result is now also shown async, this requires more sophistication in the result-rendering
Final Concept
a) Slots - backend calculations
- we define "slots" in the backend that are generally requested in parallel in the frontend
- Each slot can contain one or multiple language-resources
- Each slot can only contain the same type of language resource (only TM, only MT, only TermCollections)
- Terminologies can be fetched in a batch, therefore all TermCollections come generally in one slot and are requested at once from the frontend
- all other resources within one slot are requested sequentially from the frontend (one after the other)
- The management of slots is done purely in the backend
- There is a config of max Slots, which by default is 6 (what is the max. amount of parallel XHR requests in modern browsers)
- We may limit this config down to 3 slots in case we run into "too many processes" problems
- If not enough slots are free, we combine the TM results into one slot
- If still not enough slots are free, we combine the MTs into the remaining free slots (they have highest priority)
- If only 3 slots are configured, we simply ditribute by type (this is the minimal state). This results in even having just one slot if only MTs are configured for IT
b) Manual mode - Request abortion - frontend calculations
- The manual mode has now Buttons for each language-resource to trigger the translation of this resource
- If configured, this is the initial state (Improvement to discuss: don't we still need a "request all resources" button in the frontend for manual mode ? Can be annoying to push several buttons always ...)
- In automatic-mode (aka "instant") the buttons show up in those resources, that needed longer than the maxRequestTime. From then on, these resources can only be fetched manually.
- the new default maxRequestTime config is 10 seconds (10000ms)
- when a resource is in "button mode", the request can be aborted after maxRequestTime by pushing the button again. The button is inactive while the request is running and the maxRequestTime is not passed
Attachments
There are no Sub-Tasks for this issue.