Skip to content

Conversation

@KoenPasman
Copy link

I integrated a custom serializer and deserializer (in order to put gzip the content using lz-string lib). However, changing a certain setting caused all the keys to get reset in localStorage. Besides the entry that needs changing, also other entries are refreshed where this is not needed. Combine that with a rather slow/expensive compress function, this leads to performance degradation.

The PR checks if the key is actually changed before resetting it in the storageProvider.

@KoenPasman
Copy link
Author

KoenPasman commented Jul 22, 2016

I'm not sure why the test is failing, it looks like the $apply function is used in other usecases as well. Maybe someone can shed some light on that?

… when it's different from its previous version. Do delete the tempstorage reference.
@KoenPasman
Copy link
Author

Allright! I managed to get the optimization working without breaking the tests. The problem was that the tempstorage reference always needs to be deleted, even if we don't persist the value into storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant