Jump to content
McKay Development

Very high RAM usage?

Recommended Posts

I want to get one field from product info for almost all Steam apps (around 200k), and save it to my DB.
My code looks something like that:

const client = new SteamUser();
const appIdList = []/*Just an array with app ids*/;
const appListForDB = [];
const chunkSize = 1000;
for (let i = 0; i < appIdList.length; i += chunkSize) {
  const chunk = appIdList.slice(i, i + chunkSize);
  let result = await client.getProductInfo(chunk, [], false);
  const apps = result.apps;
  for (const key in apps) {
    const appInfo = apps[key].appinfo;
    /*Populating list for DB, it has an app id and a game executable string*/

/*Logging Off*/

/*Inserting values to DB*/

I split app id list into chunks, but the RAM usage is just building up after each chunk. So no garbage collected. I even tried to remove all DB related stuff, and RAM usage is still building up (so I think it's the "SteamUser" fault).
Is it normal behavior and I just need more RAM, or something can be done to make it work within ~200 MB RAM usage?

Link to comment
Share on other sites

Okay. But I did the same in C# with SteamKit2 and RAM usage is around 400 MB (against 2 GB+ with your lib in Node). I guess, Node is different with RAM usage?
I don't know much about Node and JS in general, so my question may sound dumb...

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...