Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4577512
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:21:22+00:00 2026-05-21T20:21:22+00:00

Was wondering what the best way to handle an expensive web task? I have

  • 0

Was wondering what the best way to handle an expensive web task?

I have an email scheduler that sends a large number of emails at any given hour. Currently the system is getting a list of emails, constructing them, and deploying them. However, this is starting to get very expensive as the list grows.. Is there a way where I can treat this like a producer-consumer multithreaded paradigm?

I was thinking I could gather all the emails and curl each one the second part of the web task — constructing and deploying the email by passing the address with the curl. However, I do believe that the system must wait for the curl’s response before continuing? So this isn’t asynchronous..

What would be the best way to do this? right now I have a cronjob checking hourly for emails to be delivered, that’s fine, but the emails are all constructed and delivered at once, so it can be slow and possibly overlap into the next hour slot — users have a specified time to retrieve so i’d like it for it to be delivered on time.

Should I create a C++ program to handle these with threads? Or can I get away with an easier method.. thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T20:21:23+00:00Added an answer on May 21, 2026 at 8:21 pm

    Should I create a C++ program to handle these with threads? Or can I get away with an easier method.. thanks!

    Keep in mind that just by creating a second thread, you don’t magically get more cycles out of your box. If your box is being taxed, the best you can do is force your email “thread” to a lower priority. It will run in the background with degraded performance. Also, moving to C++ may or may not really solve anything. Is the bottleneck the code or is it just the fact that something is blocking trying to send an email?

    Ultimately if this is a beefy, time-consuming task, you might want to look at offloading all the email processing to a separate box. Your code is already putting the emails into a database. Have a box dedicated to emailing the world check for emails on the db and send them when needed.

    I was thinking I could gather all the emails and curl each one the second part of the web task — constructing and deploying the email by passing the address with the curl

    I wasn’t sure what you meant here. But do you know whether curl’ing up to somewhere would be any faster for that server then just emailing? Might it be slower?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Was wondering what the best way to handle this would be. Say I have
I was wondering the best way to upload file to a web server in
I'm wondering what the best way is to store user settings? For a web
I was just wondering what is the best way to handle multiple languages on
I am wondering the best way to handle blocking computers after the users commit
C# 2008 SP1 I am wondering what is the best way to handle revision
just wondering the best way to handle the following, as there seems to be
I was wondering what would be the best way to handle errors in an
Best way to Handle Exceptions in C# Catch Block.I have no other choice but
I'm wondering what's the best way to handle default values for relationships when making

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.