Re: threading

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Peter,

My assumption was that this was on the ServerSide of IIS, otherwise I would
not have given the same solution as Jon did, however, he did already..

foreach (testObject website in websites)

Cor

"Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx> schreef in bericht
news:op.t9qlm3y28jd0ej@xxxxxxxxxxxxxxxxxxxxxxx
On Wed, 16 Apr 2008 20:45:46 -0700, Cor Ligthert[MVP]
<notmyfirstname@xxxxxxxxx> wrote:

I was thinking about the same solution, however on a website, this means
AFAIK that the computer is processing with 10 active users at least 110
running threads at the same time, will this not give a bunch of overhead?

Nothing about Jon's suggestion would cause that overhead, regardless.

You seem to be making the assumption that the OP is writing code that will
be server-side for a web site, and which could start ten different threads
per user, with an eleventh thread for each group of ten managing them.

I don't see anything in the original post that suggests this is the case
(sounds more like a single-user application that connects to ten different
web sites). Even if it were the case, you've also made the assumption
that all 110 threads would be running at the same time. But that would
only be the case for a CPU-bound algorithm. Most of the stuff computers
do isn't CPU-bound, and it's easily possible that only a small fraction of
those 110 threads would actually be runnable at any given time.

Of course, depending on what the OP's threads are doing, it's possible (if
they are just doing i/o with some web sites) that he would be better off
using some of the built-in HTTP communications features of .NET, along
with the async methods on the supporting classes, thereby eliminating all
of his threads altogether. But that's yet another entirely different
issue, not one that he's asked about yet.

But in any case, regardless of any of those other issues, none of that has
anything to do with Jon's suggestion. His suggestion doesn't introduce
any new threads to the equation at all. In that respect, one could argue
it's among the most efficient ways to deal with the particular question at
hand.

Pete


.



Relevant Pages

  • Re: Named based DNS
    ... Thanks for your suggestion and so as Ulf and kevin. ... Host header is the ... > want to do is run multiple web sites on one IP. ...
    (microsoft.public.windows.server.dns)
  • Re: Unable to view wanted pop up
    ... I've got a question and a suggestion. ... web sites are being blocked and what happens when you try to connect to ... and see if you can view the popups by overriding the Google popup blocker. ...
    (microsoft.public.windowsxp.general)
  • Re: If you cant get this beta progam working scrap it!!!!!!!!
    ... Help here for the Beta. ... Designing and creating Web sites ... This post is a suggestion for Microsoft, ...
    (microsoft.public.publisher.webdesign)
  • Re: Fwd: nyt and elders of zion
    ... I appreciate the suggestion that we not help hit count of anti-Semitic ... web sites, but it is not clear to me how to waybackmachine.com to do ... as key Elders of Zion. ...
    (soc.culture.jewish.moderated)