Immutable solution version
OptimizelyConfig instantiation is slow on large datafiles
Complete solution
Covers this Optimizely problem: OptimizelyConfig instantiation is slow on large datafiles. Slow OptimizelyConfig construction on large datafiles was a real SDK perf bug, fixed in 4.9.4 by removing the redundant iterations over the feature flag list.
The problem
Issue optimizely/javascript-sdk#817 (closed, 12 comments): building OptimizelyConfig redundantly iterated the datafiles feature flag list, which hurt on big datafiles. The reporter proposed consolidating the loops; the maintainers agreed, opened a PR implementing it, and shipped the improvement in release 4.9.4.
What fixed it
Slow OptimizelyConfig construction on large datafiles was a real SDK perf bug, fixed in 4.9.4 by removing the redundant iterations over the feature flag list. If you are on an older 4.x, upgrade to 4.9.4 or later. Creating one long-lived client instance instead of one per request also avoids paying the construction cost repeatedly.
Evidence
In gh:optimizely/javascript-sdk#817 (Optimizely), the issue reported was: Issue optimizely/javascript-sdk#817 (closed, 12 comments): building OptimizelyConfig redundantly iterated the datafiles feature flag list, which hurt on big datafiles. The reporter proposed consolidating the loops; the maintainers agreed, opened a PR implementing it, and shipped the improvement in release 4.9.4. The verified resolution from the thread: Slow OptimizelyConfig construction on large datafiles was a real SDK perf bug, fixed in 4.9.4 by removing the redundant iterations over the feature flag list. If you are on an older 4.x, upgrade to 4.9.4 or later. Creating one long-lived client instance instead of one per request also avoids paying the construction cost repeatedly. Source: mount the host path https at container path //github.com/optimizely/javascript-sdk/issues/817
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_xjqQNy6SNTxAuTV48mCvlg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">OptimizelyConfig instantiation is slow on large datafiles <span>— Vectle</span></a>