DoctorMcKay/node-steam-tradeoffer-manager

offer with large amount of items will cause a memory crash

Closed this issue · 2 comments

an offer with large amount items, such as 1k+ or 10k+ items will cause a large memory usage, an may cause a memory crash;
sometimes the large offer is useless for business now, but the offer-manager will load it and cause a memory crash,
so maybe could add some options to the manager to bypass or ignore to load the large offer?

momery usage was caused by those code ?

Helpers.checkNeededDescriptions(this, sentOffers.concat(receivedOffers), (err) => {

Memory usage is always going to happen if the module has to load lots of descriptions for a single offer. If memory is limited, I suggest that you disable description loading by not passing a language to the constructor.

ok, thks,
it's a way to limit the memory usage by not to set the language