Re: Design Advice to avoid Gen 2 collections
From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 05/01/04
- Previous message: Tyson Brown: "Re: Design Advice to avoid Gen 2 collections"
- In reply to: Tyson Brown: "Re: Design Advice to avoid Gen 2 collections"
- Next in thread: Tyson Brown: "Re: Design Advice to avoid Gen 2 collections"
- Reply: Tyson Brown: "Re: Design Advice to avoid Gen 2 collections"
- Messages sorted by: [ date ] [ thread ]
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
- Previous message: Tyson Brown: "Re: Design Advice to avoid Gen 2 collections"
- In reply to: Tyson Brown: "Re: Design Advice to avoid Gen 2 collections"
- Next in thread: Tyson Brown: "Re: Design Advice to avoid Gen 2 collections"
- Reply: Tyson Brown: "Re: Design Advice to avoid Gen 2 collections"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|