Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

98
Views
Optimization of code using multithreading or other techniques in NodeJS

I am doing a project that involves getting data from blockchain and sending data to it as well. However, I am a beginner on NodeJs and was stuck on an issue.

A certain portion of code roughly looks like this:

  try {
    for await (let user of users) { //users is an array with details of 5k+ users
      var balance = await callBlockChainFunction(payload); //Get data from blockchain
      //Do certain operations on balance
      txHash = await callBlockChainFunction2(balance); //Post data to blockchain
    }
  } catch (e) {
    console.log(e);
  } finally {
   //upload log to S3 bucket
  }

The callBlockChainFunction2 function takes around 5 seconds or more for response and overall this code takes 3 hours+ to run. How do I optimize this? Any points or guides to relevant resources would help a lot. Thanks.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!