|
7 | 7 | msgid "" |
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
10 | | -"POT-Creation-Date: 2025-09-04 11:19+0500\n" |
| 10 | +"POT-Creation-Date: 2025-09-05 07:23+0000\n" |
11 | 11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
12 | 12 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
13 | 13 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -77,6 +77,71 @@ msgstr "" |
77 | 77 | msgid "Try [PHP 7 preloading](https://wiki.php.net/rfc/preload)." |
78 | 78 | msgstr "" |
79 | 79 |
|
| 80 | +#. type: Title ## |
| 81 | +#: en/tutorial/performance-tuning.md |
| 82 | +#, no-wrap |
| 83 | +msgid "Optimizing your code <span id=\"optimizing-code\"></span>" |
| 84 | +msgstr "" |
| 85 | + |
| 86 | +#. type: Plain text |
| 87 | +#: en/tutorial/performance-tuning.md |
| 88 | +msgid "" |
| 89 | +"Beyond environment configuration, there are code-level optimizations that " |
| 90 | +"can improve your application's performance:" |
| 91 | +msgstr "" |
| 92 | + |
| 93 | +#. type: Bullet: '- ' |
| 94 | +#: en/tutorial/performance-tuning.md |
| 95 | +msgid "" |
| 96 | +"Look out for [algorithm complexity](https://en.wikipedia.org/wiki/" |
| 97 | +"Time_complexity). Especially give attention to `foreach` within `foreach` " |
| 98 | +"loops but look out for using [heavy PHP functions](https://stackoverflow.com/" |
| 99 | +"questions/2473989/list-of-big-o-for-php-functions) in loops as well." |
| 100 | +msgstr "" |
| 101 | + |
| 102 | +#. type: Bullet: '- ' |
| 103 | +#: en/tutorial/performance-tuning.md |
| 104 | +msgid "" |
| 105 | +"[Speeding up array_merge()](https://www.exakat.io/speeding-up-array_merge/)" |
| 106 | +msgstr "" |
| 107 | + |
| 108 | +#. type: Bullet: '- ' |
| 109 | +#: en/tutorial/performance-tuning.md |
| 110 | +msgid "" |
| 111 | +"[Move that foreach() inside the method](https://www.exakat.io/move-that-" |
| 112 | +"foreach-inside-the-method/)" |
| 113 | +msgstr "" |
| 114 | + |
| 115 | +#. type: Bullet: '- ' |
| 116 | +#: en/tutorial/performance-tuning.md |
| 117 | +msgid "" |
| 118 | +"[Array, classes and anonymous classes memory usage](https://www.exakat.io/" |
| 119 | +"array-classes-and-anonymous-memory-usage/)" |
| 120 | +msgstr "" |
| 121 | + |
| 122 | +#. type: Bullet: '- ' |
| 123 | +#: en/tutorial/performance-tuning.md |
| 124 | +msgid "" |
| 125 | +"Use fully qualified function names with leading backslashes to optimize " |
| 126 | +"opcache performance. When calling [certain global functions](https://github." |
| 127 | +"com/php/php-src/blob/944b6b6bbd6f05ad905f5f4ad07445792bee4027/Zend/" |
| 128 | +"zend_compile.c#L4291-L4353) from within a namespace, PHP first searches in " |
| 129 | +"the current namespace before falling back to the global namespace. Adding a " |
| 130 | +"leading backslash (e.g., `\\count()` instead of `count()`) tells PHP to " |
| 131 | +"directly use the global function, avoiding the namespace lookup and " |
| 132 | +"improving opcache efficiency. This optimization is best implemented " |
| 133 | +"automatically using tools like [PHP-CS-Fixer](https://github.com/" |
| 134 | +"FriendsOfPHP/PHP-CS-Fixer) with the `native_function_invocation` rule." |
| 135 | +msgstr "" |
| 136 | + |
| 137 | +#. type: Plain text |
| 138 | +#: en/tutorial/performance-tuning.md |
| 139 | +msgid "" |
| 140 | +"The above optimizations would give you a significant performance boost only " |
| 141 | +"if the code in question is executed frequently. That is usually the case for " |
| 142 | +"big loops or batch processing." |
| 143 | +msgstr "" |
| 144 | + |
80 | 145 | #. type: Title ## |
81 | 146 | #: en/tutorial/performance-tuning.md |
82 | 147 | #, no-wrap |
|
0 commit comments