this seems to be causing an issue when performing the initial log fetch for a subreddit with many thousands of logs. mem usage spikes to a gig+ during the insertMany(group)here.
it must have something to do with mongo trying to access properties on the logs that are being inserted, but since they're formatted prior to the insertion (and therefore no longer proxy objects), I'm not sure how that would be happening.
this may require changes outside of reddit.ts
example change: return await this.r.getSubreddit(subredditName).getModerationLog(opts).fetchAll() -> return (await this.r.getSubreddit(subredditName).getModerationLog(opts)).fetchAll()
r.config({ proxies: false })
this seems to be causing an issue when performing the initial log fetch for a subreddit with many thousands of logs. mem usage spikes to a gig+ during the
insertMany(group)
here.it must have something to do with mongo trying to access properties on the logs that are being inserted, but since they're formatted prior to the insertion (and therefore no longer proxy objects), I'm not sure how that would be happening.
this may require changes outside of
reddit.ts
example change:
return await this.r.getSubreddit(subredditName).getModerationLog(opts).fetchAll()
->return (await this.r.getSubreddit(subredditName).getModerationLog(opts)).fetchAll()