jsonapi-serializer icon indicating copy to clipboard operation
jsonapi-serializer copied to clipboard

Replaces deep merge with shallow key sets on alreadyIncluded

Open mgebeily opened this issue 6 years ago • 3 comments

I've encountered some performance issues using lodash's _set and _merge objects. I clocked in over 10 seconds for deserialization of a large, nested JSONAPI object. This isn't a fault of the library, just the nature of deep merges.

I've replaced the deep merge with a top level key set of a stringified path and brought down deserialization time on my case to be negligible.

Feedback is appreciated. Thanks in advance!

mgebeily avatar Oct 18 '19 18:10 mgebeily

@SeyZ Let me know if you have any thoughts or if you'd want a test for performance on here with one of the edge cases I was encountering before. Thanks!

mgebeily avatar Oct 29 '19 14:10 mgebeily

@SeyZ Wanted to circle back one last time and see if there's any interest in merging this. My team is currently running off of a fork of this repo which we'd like to make a temporary solution if possible!

mgebeily avatar Mar 20 '20 16:03 mgebeily

@SeyZ Is there any interest in merging this? Seems like a good change

Kuhreez avatar May 21 '21 18:05 Kuhreez