Using threads in ASPX objects

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Travis

    Using threads in ASPX objects

    Hello,

    I am working on a web application, where I should generate at some scenarios
    large amounts of emails. I noticed that the mailing process is pretty slow,
    hence the page loading when these emails are generated is slow too.

    If I will use threads to execute the mailing process the page will load
    quickly, and the thread will run in the background producing emails.

    I know that in Java environment (Servlets) developers are not encouraged to
    use threads in the servlets code, since all threading issues are handled by
    the Servlet Container.

    What are the ASP.NET methodologies regarding this matter?

    Thanks,
    David.


  • Alvin Bruney

    #2
    Re: Using threads in ASPX objects

    ..Net is not limited in this way as java.
    ..About the only thing you need to be concerned about is the usual threading
    concurrency issues. Remember too, that thread management gets expensive
    after about 15-20 threads are running simultaneously negating the benefits
    of threading. The usual rules of touching window objects with the created
    thread still applies.

    "David Travis" <dwork@macam.ac .il> wrote in message
    news:#$N8Hy3VDH A.484@TK2MSFTNG P09.phx.gbl...[color=blue]
    > Hello,
    >
    > I am working on a web application, where I should generate at some[/color]
    scenarios[color=blue]
    > large amounts of emails. I noticed that the mailing process is pretty[/color]
    slow,[color=blue]
    > hence the page loading when these emails are generated is slow too.
    >
    > If I will use threads to execute the mailing process the page will load
    > quickly, and the thread will run in the background producing emails.
    >
    > I know that in Java environment (Servlets) developers are not encouraged[/color]
    to[color=blue]
    > use threads in the servlets code, since all threading issues are handled[/color]
    by[color=blue]
    > the Servlet Container.
    >
    > What are the ASP.NET methodologies regarding this matter?
    >
    > Thanks,
    > David.
    >
    >[/color]


    Comment

    • Michal A. Valasek

      #3
      Re: Using threads in ASPX objects

      Hi,

      agree with previous post and add one more hint: Do not use System.Web.Mail
      for this, its painfully slow, because its using COM Interop to CDONTS (which
      are slow notoriously). Best way is to have MS SMTP installed and generate
      message files directly to Mail Pickup folder, its lots faster.

      I wrote free component for this (QuickMail, see
      http://software.altaircom.net/HomePa...d=quickmailer),
      but it's easy DYI. I build upon that list manager software
      (http://palehorse.altaircom.net, <ad>available for sale or rent ;-)</ad>,
      and its working fine for huge lists.

      --
      Michal A. Valasek, Altair Communications, http://www.altaircom.net
      Please do not reply to this e-mail, for contact see http://www.rider.cz


      Comment

      • David Treves

        #4
        Re: Using threads in ASPX objects

        Ok, thanks for your replies, you were most helpful!

        Thanks,
        Dudi.


        *** Sent via Developersdex http://www.developersdex.com ***
        Don't just participate in USENET...get rewarded for it!

        Comment

        • MS News

          #5
          Re: Using threads in ASPX objects

          Can it do Attachments?
          What is the .dll written in, what language?

          Thanks

          "Michal A. Valasek" <news@altaircom .net> wrote in message
          news:eZlgYb5VDH A.3220@tk2msftn gp13.phx.gbl...[color=blue]
          > Hi,
          >
          > agree with previous post and add one more hint: Do not use System.Web.Mail
          > for this, its painfully slow, because its using COM Interop to CDONTS[/color]
          (which[color=blue]
          > are slow notoriously). Best way is to have MS SMTP installed and generate
          > message files directly to Mail Pickup folder, its lots faster.
          >
          > I wrote free component for this (QuickMail, see
          >[/color]
          http://software.altaircom.net/HomePa...d=quickmailer),[color=blue]
          > but it's easy DYI. I build upon that list manager software
          > (http://palehorse.altaircom.net, <ad>available for sale or rent ;-)</ad>,
          > and its working fine for huge lists.
          >
          > --
          > Michal A. Valasek, Altair Communications, http://www.altaircom.net
          > Please do not reply to this e-mail, for contact see http://www.rider.cz
          >
          >[/color]


          Comment

          Working...