Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve perf of tm api with global search #595

Closed
pascalchevrel opened this issue Jan 19, 2016 · 1 comment
Closed

Improve perf of tm api with global search #595

pascalchevrel opened this issue Jan 19, 2016 · 1 comment
Assignees

Comments

@pascalchevrel
Copy link
Member

We have already improved the perf of this view with the fix of getRepoStrings() but I found ways to make it faster and also simplify the getTranslationMemoryResults() method.

@pascalchevrel pascalchevrel self-assigned this Jan 19, 2016
pascalchevrel added a commit to pascalchevrel/transvision that referenced this issue Jan 19, 2016
pascalchevrel added a commit to pascalchevrel/transvision that referenced this issue Jan 20, 2016
- If we repo does not contain any result, we skip it (and avoid calculation). If the strinf searched exists in one repo only, this can divide time by 10 at least
- Moved the loading of $target_strings after the above check, no need to load them if there are no match
- We no longer load target strings for all repos and send them to ShowResults::getTranslationMemoryResults(), we filter the arrays early to only have target strings with the same keys as the source strings we looked for, this way we avoid sending noise to the function
- Minor simplification of ShowResults::getTranslationMemoryResults() parameters
pascalchevrel added a commit to pascalchevrel/transvision that referenced this issue Jan 20, 2016
- If we repo does not contain any result, we skip it (and avoid calculation). If the searched string exists in one repo only, this can divide time by 10 at least
- Moved the loading of $target_strings after the above check, no need to load them if there are no match
- We no longer load target strings for all repos and send them to ShowResults::getTranslationMemoryResults(), we filter the arrays early to only have target strings with the same keys as the source strings we looked for, this way we avoid sending noise to the function
- We remove duplicate strings to reduce the number of strings we need to sent to ShowResults::getTranslationMemoryResults()
- We use the + operator instead of array_merge, it's slightly faster and the functional difference don't matter in this case
- Minor simplification of ShowResults::getTranslationMemoryResults() parameters

more optims
pascalchevrel added a commit to pascalchevrel/transvision that referenced this issue Jan 20, 2016
- If we repo does not contain any result, we skip it (and avoid calculation). If the searched string exists in one repo only, this can divide time by 10 at least
- Moved the loading of $target_strings after the above check, no need to load them if there are no match
- We no longer load target strings for all repos and send them to ShowResults::getTranslationMemoryResults(), we filter the arrays early to only have target strings with the same keys as the source strings we looked for, this way we avoid sending noise to the function
- We remove duplicate target strings to reduce the number of strings we need to sent to ShowResults::getTranslationMemoryResults()
- We use the + operator instead of array_merge, it's slightly faster and the functional difference don't matter in this case
- Minor simplification of ShowResults::getTranslationMemoryResults() parameters

more optims
pascalchevrel added a commit to pascalchevrel/transvision that referenced this issue Jan 20, 2016
- If we repo does not contain any result, we skip it (and avoid calculation). If the searched string exists in one repo only, this can divide time by 10 at least
- Moved the loading of $target_strings after the above check, no need to load them if there are no match
- We no longer load target strings for all repos and send them to ShowResults::getTranslationMemoryResults(), we filter the arrays early to only have target strings with the same keys as the source strings we looked for, this way we avoid sending noise to the function
- We remove duplicate target strings to reduce the number of strings we need to sent to ShowResults::getTranslationMemoryResults()
- We use the + operator instead of array_merge, it's slightly faster and the functional difference don't matter in this case
- Minor simplification of ShowResults::getTranslationMemoryResults() parameters

more optims
pascalchevrel added a commit to pascalchevrel/transvision that referenced this issue Jan 20, 2016
- If we repo does not contain any result, we skip it (and avoid calculation). If the searched string exists in one repo only, this can divide time by 10 at least
- Moved the loading of $target_strings after the above check, no need to load them if there are no match
- We no longer load target strings for all repos and send them to ShowResults::getTranslationMemoryResults(), we filter the arrays early to only have target strings with the same keys as the source strings we looked for, this way we avoid sending noise to the function
- We remove duplicate target strings to reduce the number of strings we need to sent to ShowResults::getTranslationMemoryResults()
- We use the + operator instead of array_merge, it's slightly faster and the functional difference don't matter in this case
- Minor simplification of ShowResults::getTranslationMemoryResults() parameters

more optims
flodolo added a commit that referenced this issue Jan 20, 2016
Issue #595 faster Translation Memory (tm) API
@pascalchevrel
Copy link
Member Author

perf improved between x2 and x4 depending on cases, should be good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant