TehShrike / deepmerge

A library for deep (recursive) merging of Javascript objects
MIT License
2.75k stars 216 forks source link

High CPU usage with large object merge #237

Open samuraitruong opened 3 years ago

samuraitruong commented 3 years ago

Currently, I need to merge 8 JSON files which about 30-50MB each file, the file include an object with multiple nested arrays

I can see during the merge it uses lots of CPU, it works fine on local computer but I the code running in the dockerize just as ECS/EKS, the container will get killed when the CPU hit 100%. Is their any document/guideline for large object merge?

RebeccaStevens commented 2 years ago

I'd recommend my package deepmerge-ts or alternaitvely object-accumulator.

Both are a lot more performant.