-
Notifications
You must be signed in to change notification settings - Fork 83
Description
Is there an existing issue for this?
- I have searched the existing issues
SDK Version
6.0.0
Current Behavior
We have observed a significant slowdown in the createInstance
function since the latest major release, v6. Previously, this function executed in an average of a few milliseconds when provided with a string datafile, as outlined in the configuration documentation. The use of a string
datafile is supported for both project config managers, createPollingProjectConfigManager
and createStaticProjectConfigManager
, as described in the API. Benchmark results indicate the following average execution times:
v5: createInstance 6.4ms
v6: createInstance 130.5ms
I added additional timing logs to identify the bottleneck, and it appears that this forEach loop, which constructs the experiments
, accounts for the majority of the time taken by createInstance
.
In our case, we provide a stringified version of the datafile because we resolve it during server-side rendering (SSR), making it redundant to fetch the file again during browser initialization. The extent of the slowdown is substantial enough that I consider this a bug.
Expected Behavior
Similar time as with v5.
Steps To Reproduce
Run createInstance
and measure timings
SDK Type
Node
Node Version
v22.18.0
Browsers impacted
all
Link
No response
Logs
Severity
Affecting users
Workaround/Solution
No response
Recent Change
No response
Conflicts
No response