We used this library to log the size of objects being cached. However, it actually causes massive memory usage spikes.
To put it in numbers:
Heap size (v8.getHeapStatistics()['used_heap_size']) jumped from 130 MB to 477 MB, while the object being measured was only 27 MB.
That means the library consumed ~347 MB of heap just to calculate the size of a 27 MB object.
Please consider updating your README — especially on the npm page — to warn users about this behavior.
It’s ironic that a library intended to help diagnose memory issues is, in fact, introducing them.
We used this library to log the size of objects being cached. However, it actually causes massive memory usage spikes.
To put it in numbers:
Heap size (v8.getHeapStatistics()['used_heap_size']) jumped from 130 MB to 477 MB, while the object being measured was only 27 MB.
That means the library consumed ~347 MB of heap just to calculate the size of a 27 MB object.
Please consider updating your README — especially on the npm page — to warn users about this behavior.
It’s ironic that a library intended to help diagnose memory issues is, in fact, introducing them.