sphere-node-sdk
sphere-node-sdk copied to clipboard
Change default for process accumulate option
Description
For processing paged results we have very helpful function called process
. Currently it's default setting for accumulate
results is true
which depending on amount of pages and data callback function produces, might lead to unpredictable memory consumption. Because of that on every usage we have to explicitly override defaults with process(myCallbackFn, { accumulate: false })
.
Expected Behavior
Default for accumulate should be false
Current Behavior
Default for accumulate is true
While this a good step forward, this is a breaking change. And I have mixed feelings about breaking the SDK in this manner. I will however support it in the JS SDK