[Mono-devel-list] [PATCH] changing the implementation of HttpRequest.ServerVariables

Alon Gazit along at mainsoft.com
Mon Jun 7 11:35:30 EDT 2004


Hello,
 
In Order to improve performance , I have change Server Variables
implementation.
 
I performed the following change in HttpRequest:

*	 Added 2 new properties : Context and WorkerRequest.
*	The method ParseServerVariables creates a new
ServerVariablesCollection instance instead of creating new
NameValueCollection that contains all the 
server variables.

ServerVariableCollection is a new class that derive from
NameValueCollection.
While trying to get the value associated with a specified key, the new
class performs the following steps:

*	Check if the collection was loaded in the past (meaning that all
the variables were added). if the answer is yes , 
then return the value from the collection. 
*	if the answer was no ,check if for this key the method can be
called directly. if the answer is yes return the method value.
*	it answer was no, add all the server variables to the collection
and return the key's value from the collection.

Thanks,
 
Alon
 
  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040607/65e91732/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ServerVariablesCollection.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040607/65e91732/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: HttpRequest.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040607/65e91732/attachment-0001.pl 


More information about the Mono-devel-list mailing list