﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Matt Johnson commented on NuGet Perf, The Final Part &amp;ndash; Load Testing &amp;ndash; Setup</title><description>@Simon - Thanks for pointing that out.  I was thinking about the problem of static fields in GENERIC classes.  You are right, there will only be one static documentstore instance here, so I guess it's ok.</description><link>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment11</link><guid>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment11</guid><pubDate>Thu, 20 Sep 2012 21:15:35 GMT</pubDate></item><item><title>Matt Warren commented on NuGet Perf, The Final Part &amp;ndash; Load Testing &amp;ndash; Setup</title><description>@Chanan Braunstein, @tatabánya gyerekangol

For a MapReduce index the default is FieldStorage.Yes, so this is just an optimisation.

You can still query against a field when it has FieldStorage.No, but it means that you just can't read that value from the index. So in this case reading the contents of "Query" field is not needed, so not storing it saves space.</description><link>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment10</link><guid>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment10</guid><pubDate>Tue, 18 Sep 2012 12:13:24 GMT</pubDate></item><item><title>Simon commented on NuGet Perf, The Final Part &amp;ndash; Load Testing &amp;ndash; Setup</title><description>@Matt The document store is static, so there will only be one per app not one for each controller.
The delay is effectively the same as in Application_Start, as that won't fire until the first request anyway (assuming not using the new "warm-up" app thingy added in ASP.NET 4, and that the first request will end up hitting a controller).</description><link>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment9</link><guid>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment9</guid><pubDate>Tue, 18 Sep 2012 11:22:24 GMT</pubDate></item><item><title>tatabánya gyerekangol commented on NuGet Perf, The Final Part &amp;ndash; Load Testing &amp;ndash; Setup</title><description>@chanan braunstein: may it's not just about fields...but I'm courious too:)</description><link>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment8</link><guid>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment8</guid><pubDate>Tue, 18 Sep 2012 10:55:05 GMT</pubDate></item><item><title>João P. Bragança commented on NuGet Perf, The Final Part &amp;ndash; Load Testing &amp;ndash; Setup</title><description>What other code is actually going to lock on that type? this is not production code, it's for a PERF TEST. Good lord.</description><link>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment7</link><guid>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment7</guid><pubDate>Tue, 18 Sep 2012 04:13:24 GMT</pubDate></item><item><title>Chanan Braunstein commented on NuGet Perf, The Final Part &amp;ndash; Load Testing &amp;ndash; Setup</title><description>Ayende, What is the purpose of Store(x=&gt;x.Query, FieldStorage.No);? What does it do if it is not storing the query field in the index? When should it be used, etc...</description><link>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment6</link><guid>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment6</guid><pubDate>Mon, 17 Sep 2012 16:34:15 GMT</pubDate></item><item><title>Matt Johnson commented on NuGet Perf, The Final Part &amp;ndash; Load Testing &amp;ndash; Setup</title><description>Ayende, I thought the general guidance was to initialize the documentstore during application startup in global.asax?  The way you have it here, there will be a delay when the first user hits the controller.

Also, this creates a separate documentstore for each controller, which I also thought was bad form.  Shouldn't there just be one per app?</description><link>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment5</link><guid>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment5</guid><pubDate>Mon, 17 Sep 2012 15:48:37 GMT</pubDate></item><item><title>Chris commented on NuGet Perf, The Final Part &amp;ndash; Load Testing &amp;ndash; Setup</title><description>I'll echo the other guys about the lock(typeof(...)).  Locking on a Type instance is quite dangerous as the same instance can be used across AppDomains. The documentation (http://msdn.microsoft.com/en-us/library/c5kehkcz(v=vs.80).aspx) says that it is only a problem if the Type is publicly accessible, but it seems to me that it could also be a problem if someone got the Type instance through reflection or returned polymorphically through an interface or something.

Here is an analysis of the problem: http://www.pcreview.co.uk/forums/dont-lock-type-objects-t1373491.html (this is from 2004, so it may not be completely accurate anymore).</description><link>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment4</link><guid>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment4</guid><pubDate>Mon, 17 Sep 2012 13:59:56 GMT</pubDate></item><item><title>Adam Ralph commented on NuGet Perf, The Final Part &amp;ndash; Load Testing &amp;ndash; Setup</title><description>+1 Simon Hughes... never lock on something which other peoples code can see.</description><link>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment3</link><guid>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment3</guid><pubDate>Mon, 17 Sep 2012 11:55:05 GMT</pubDate></item><item><title>Simon Hughes commented on NuGet Perf, The Final Part &amp;ndash; Load Testing &amp;ndash; Setup</title><description>hmm, my less than and greater than were removed.
Lazy &amp;lt; DocumentStore &amp;gt;</description><link>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment2</link><guid>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment2</guid><pubDate>Mon, 17 Sep 2012 11:39:54 GMT</pubDate></item><item><title>Simon Hughes commented on NuGet Perf, The Final Part &amp;ndash; Load Testing &amp;ndash; Setup</title><description>Best not to use lock (typeof (RavenController)), as some other code could also lock on that type. Better to use a private lock field instead.

What about using Lazy&lt;DocumentStore&gt; instead?</description><link>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment1</link><guid>http://ayende.com/158529/nuget-perf-the-final-part-load-testing-setup#comment1</guid><pubDate>Mon, 17 Sep 2012 11:38:34 GMT</pubDate></item></channel></rss>