Re: Design Advice to avoid Gen 2 collections

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 05/01/04

  • Next message: Tyson Brown: "Re: Design Advice to avoid Gen 2 collections"
    Date: Sat, 1 May 2004 07:10:38 +0100
    
    

    Tyson Brown <tyson.brown.REM0VE@sbcglobal.net> wrote:
    > > Yes - although obviously it'll depend on how many requests you get at
    > > the same time.
    >
    > I am planning on a load of 1,000+ users per machine, with 100-200
    > concurrent requests at any given time. While not huge load, these
    > servers have only moderate horsepower, so I am wanting to make this
    > as lean as possible.

    That's a pretty large load - but how long is each request going to
    take? 100-200 *concurrent* requests is quite a lot, IME, even for 1000
    concurrent users (if you see what I mean). Does each request take a
    long time to process?
         
    > > Not entirely, no - step 3 puts the value type on the heap, assuming
    > > that "assigning that struct variable to a class" means assigning the
    > > value of an instance or class variable in a class to be the same as the
    > > local variable.
    >
    > So to clarify, here is a little code sample:
    > index.aspx
    > Sub page_load
    > Dim myMember as MemberValueType
    > myMember.PopulateData(MemberId)
    >
    > Dim myControl as MyUserControl = Page.LoadControl("myControl.ascx")
    > myControl.CurrentMember = myMember <--- this is the line in question
    > Page.Controls.Add(myControl)
    > myControl = nothing
    > myMember = nothing
    > end sub
    >
    > Class MyUserControl
    > Inherits System.Web.UI.UserControl
    >
    > Public CurrentMember as MemberTypeValue
    > End Class
    >
    > In the above scenario, would the MemberValueType be added to the heap or not?

    Yes - because all the data for myControl is on the heap, including
    myControl.CurrentMember.

    -- 
    Jon Skeet - <skeet@pobox.com>
    http://www.pobox.com/~skeet
    If replying to the group, please do not mail me too
    

  • Next message: Tyson Brown: "Re: Design Advice to avoid Gen 2 collections"

    Relevant Pages

    • Re: Design Advice to avoid Gen 2 collections
      ... I am planning on a load of 1,000+ users per machine, with 100-200 concurrent requests at any given time. ... While not huge load, these servers have only moderate horsepower, so I am wanting to make this as lean as possible. ... Dim myMember as MemberValueType ... would the MemberValueType be added to the heap or not? ...
      (microsoft.public.dotnet.framework.clr)
    • Re: Web tools
      ... I wanted to see what kind of load this server would handle ... concurrent *users*? ... >To setup the requisite number of requests so you can set ...
      (microsoft.public.inetserver.iis)
    • Re: ASP.NET Threading, IIS pipeline and HTTP
      ... if you asp.net sessions, then the requests are queued, as session management ... is not designed for concurrent access to the same session. ... The .aspx page for each frame contains a button with a server click event ...
      (microsoft.public.dotnet.framework.aspnet)
    • [RFC][PATCH 2/2] readahead: avoid page-by-page reads on POSIX_FADV_RANDOM
      ... submit read IO for whatever application requests. ... Note that the random hint is not likely to help random reads performance ... same file descriptor is being concurrent read in another thread. ...
      (Linux-Kernel)
    • Re: Web tools
      ... A request is a physical request - the HTTP request is coming into the ... server, and the server is sending it back ... So, 10,000 concurrent users might only mean 500 concurrent requests, because ...
      (microsoft.public.inetserver.iis)