FloatingF Posted 18 hours ago Report Posted 18 hours ago (edited) I’m using the functions `enablePicsCache` and `picsCacheAll` in `steamUser`. However, I believe these two features eventually lead to a memory leak. Is this a known issue or intended behavior? The `picsCache` keeps growing over time (this becomes especially noticeable when running 5 or more bots simultaneously), until after a few days the JavaScript Heap runs out of memory and crashes, since the Cache cannot be garbage collected. When these functions are not enabled, this memory leak does not occur. In Chrome DevTools, most of the consumed memory can also be traced back to `picsCache`. Is there a way to store this `picsCache` on disk (or in some other form of persistent storage) instead of keeping it in memory, in order to prevent the memory leak? Edited 18 hours ago by FloatingF Quote
Dr. McKay Posted 3 hours ago Report Posted 3 hours ago It's not really a memory leak, it's by design. picsCacheAll is especially going to consume lots of memory since it caches all app data it ever comes across. You really shouldn't use picsCacheAll in any app that lives longer than a few hours, and you should avoid using picsCache in general unless you really need it. For what purpose do you need the pics cache? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.