Hi Vladimir, Just a small cosmetic detail in "ServerVariablesCollection.cs.patch". In the switch statement, you could combine quite a few "case"s into one:
switch (name) { . . case "APPL_MD_PATH": return _request.WorkerRequest.GetServerVariable ("APPL_MD_PATH"); case "AUTH_PASSWORD": return _request.WorkerRequest.GetServerVariable ("AUTH_PASSWORD"); case "CERT_COOKIE": return _request.WorkerRequest.GetServerVariable ("CERT_COOKIE"); case "CERT_FLAGS": return _request.WorkerRequest.GetServerVariable ("CERT_FLAGS"); . . ...could be turned into... switch (name) { . . case "APPL_MD_PATH": case "AUTH_PASSWORD": case "CERT_COOKIE": case "CERT_FLAGS": return _request.WorkerRequest.GetServerVariable (name); . . - Juraj On Thu, 2007-03-29 at 06:04 -0700, Vladimir Krasnov wrote: > Hello, > > Please review a performance optimization for HttpRequest.Headers and > HttpRequest.ServerVariables collections. > It implements lazy collection fill because most common flow is to ask > for value by name. Only if user ask for enumerator or count, collection > will be fully loaded. > This gives about 25% performance improvement on common flow. > > This causes one test case to fail: > MonoTests.System.Web.Test_HttpFakeRequest.Test_EmptyUnknownRow : > NullReferenceException was expected, > in my opinion this test is incorrect, and should be removed, because it > tests undocumented behavior that may depend on implementation. > > Vladimir > _______________________________________________ > Mono-devel-list mailing list > Mono-devel-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-devel-list _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list