diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2026-01-15 06:24:41 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2026-01-15 06:24:41 +0200 |
| commit | 04db46f0b12c894983fdb1bb783fbad9d5a11943 (patch) | |
| tree | dbc9903b400d5bdda4f318f1d56ad8c39bbfb70d /indra/llui/llkeywords.cpp | |
| parent | 69cdf5c0f584617ef57a7168a64ee52f64451b12 (diff) | |
#5278 Reduce reallocs
Diffstat (limited to 'indra/llui/llkeywords.cpp')
| -rw-r--r-- | indra/llui/llkeywords.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index bbcb45f100..c4272401b9 100644 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -506,6 +506,8 @@ void LLKeywords::collectSegmentOps(segment_ops_t& ops, const LLWString& wtext, b { return; } + // Heuristic to reduce reallocation churn on large scripts. + ops.reserve(wtext.size() / 8); const llwchar* base = wtext.c_str(); const llwchar* cur = base; |
