-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Cache bridge deserialization #138
Comments
It can affect performance yes, if the data is large and you're calling it many times in a loop. But in common cases, it should not be a problem. You should not store huge amounts of data in UserDefaults anyway. I do think we should look into caching the deserialized data using an LRU cache. Actually, the first thing we could do is to simply cache all calls for 5 seconds. That way, we can make sure that we don't waste time on deserializing things that are called in a loop. |
The above code will call
bridge.deserialize
twice. If user3 is an array and there are many attributes of the User3 type, will it affect performance?Would it be better to cache the data after Defaults[.user3] is executed once?
The text was updated successfully, but these errors were encountered: