Skip to content
Browse files
Save memory on Global search API
By unsetting the $target_strings and $source_strings, we save 9MB per request, which is probably a good thing for performances of the API (for Pontoon).

That's an easy win on existing code.
  • Loading branch information
pascalchevrel committed Jan 11, 2016
1 parent 5620048 commit c229d22da6c23484c084e4f2febad2f1cb30e42b
Showing 1 changed file with 1 addition and 0 deletions.
@@ -41,6 +41,7 @@

$source_strings_merged = array_merge($source_strings, $source_strings_merged);
$target_strings_merged = array_merge($target_strings, $target_strings_merged);
unset($source_strings, $target_strings);

return $json = ShowResults::getTranslationMemoryResults(

0 comments on commit c229d22

Please sign in to comment.