Jump to content
McKay Development

Full poll in getOffers() with descriptions synchronously blocking app


Recommended Posts

Hey there,

I've noticed that whenever the trade offer manager does a full poll for one of my accounts it can block the Node.js process. If I turn off description mappings (not set language) it's OK.

Currently I have a requirement for descriptions, but may investigate moving away from it, however thought I'd bring this to your attention. This issue arises because the `sentOffers` data is ~67MB (as stringified). It seems to freeze up when `_mapItemsToDescriptions` is called in `createOfferFromData` for my sent items.

I tried moving to an old version where it does not paginate, but no luck, so it's likely a recent sent offer.

I think it may be the loop in `EconItem` (as the Node.js debugger kept putting me in this loop when I spammed it repeatedly), or just the main map in `_mapItemsToDescriptions` -- it takes ~60 seconds to a full refresh (like 15-30 seconds of processing) which can block the app.

I'm not exactly sure how you'd solve this unless you made it async or something. If you're interested, I can provide some `sentOffers` data.

In the meantime I may just look at moving off using descriptions. I've tried tweaking the cache values (increasing it to an extremely large number) and it doesn't seem to have any impact whatsoever.

Edited by jfx.
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...