-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] High async storage usage #294
Comments
Hey @matinzd , thanks for reporting this. From the given log, it does seem like its an issue related to async storage and It might be due to any of the followings -
Its just hard to find the exact reason without more detail of the client. If you provide a little more specific information on how to reproduce that would be amazing for us to find out if there is any actual issue from our end. When it comes to Optimizely SDK, we have working export default interface PersistentKeyValueCache<V = string> {
contains(key: string): Promise<boolean>;
get(key: string): Promise<V | undefined>;
remove(key: string): Promise<boolean>;
set(key: string, val: V): Promise<void>;
} Then you have to pass the provider while instantiating - const optimizely = createInstance({
sdkKey: 'SDK_KEY',
persistentCacheProvider: new CustomCacheProvider()
}) Its possible to switch from default async storage to storage of your choice in this way. However, I have created an internal ticket FSSDK-10907 with a proposal to switch to a better default alternative than Async Storage. |
Yeah I have done that but unfortunetaly even if I have my own storage implementation, I had to install async-storage because it's not being dynamically loaded in the optimizely core. There are some parts of implementation that is still using async storage directly and that can cause issues.
That would be great! Thank you so much :) I would suggest dynamically importing the default implementation would solve the issue.
I guess it can be a user problem but it's been more frequent for past couple of days that we have implemented optimizely. Given that manifest file does not have limitation, I would say that's a coincident for now and I can ignore it :) I also read about the cocoa error which is likely that user storage space is causing this. |
Is there an existing issue for this?
SDK Version
3.2.2
Current Behavior
High storage usage on AsyncStorage.
Expected Behavior
The storage should be flushed when old data is not needed anymore.
Steps To Reproduce
React Framework
React Native
Browsers impacted
No response
Link
No response
Logs
Severity
Affecting users
Workaround/Solution
To follow up on optimizely/javascript-sdk#952, it's better to move the storage implementation outside of the optimizely SDK so that we can use other solutions that have better performance and reliablity overall.
Recent Change
No response
Conflicts
No response
The text was updated successfully, but these errors were encountered: