Sandip's Programming Zen

An attempt to share tech/coding experiences

A small but important performance booster

with one comment

Web applications which send out email notifications as part of their user interaction process normally works fine, but as they grow in terms of number of users it tends to feel slower in parts where email is sending out in background. Reason is obvious, your smtp server has to handle more request then before and it takes time to process each email request, so your main application thread has to wait (and so does user).

Solution is simple, just isolate your email sending functions by creating separate thread (and also set it on low priority). This way your main application thread (and thus your users) does not have to wait them processed.

I have seen simple functions to take around 30 seconds to process just because email sending function is waiting in background just to get an time out error from smtp server.


Written by Sandip

June 22, 2008 at 10:17 am

Posted in Programming

One Response

Subscribe to comments with RSS.

  1. thats it, dude


    October 6, 2008 at 7:40 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: