We need to be careful not to create objects much larger than the output inside functions.
For example, the raw results for 1000 calls for comment details are about 15 MB, whereas the data frame we return for 12,000 comments is only .2 MB.
Thus, loops should be designed to hold the final result and overwrite larger objects that are no longer needed rather than making large lists and then extracting data from them.
We need to be careful not to create objects much larger than the output inside functions.
For example, the raw results for 1000 calls for comment details are about 15 MB, whereas the data frame we return for 12,000 comments is only .2 MB.
Thus, loops should be designed to hold the final result and overwrite larger objects that are no longer needed rather than making large lists and then extracting data from them.