Skip to content

Custom copy+equality functions #176

@wyvern8

Description

@wyvern8

Firstly, thanks for maintaining this module - it is really helpful. I've noticed for large objects in a single key, the performance of angular.copy is not great, meaning that ngstorage was identified as a bottleneck in our app due to the frequency at which this is done. After testing a few approaches we found that using angular.fromjson(angular.tojson(obj)) to copy objects within ngstorage to be about 3 times faster for our use case. It would be great if ngstorage could use local overridable functions for both copy and object equality operations in each place they are needed, perhaps defaulting to current implementations - similar to the de/serializer functions. This would also mean people can plugin things like lodash eq+clonedeep. If this is not clear I can send a PR when I get a chance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions