﻿<?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>SeeR commented on Optimizing Windsor</title><description>"In most big apps, you don't. They change, they are flexible."
  
  
You mean they change after compilation and they should be in some configuration file ??
</description><link>http://ayende.com/4202/optimizing-windsor#comment18</link><guid>http://ayende.com/4202/optimizing-windsor#comment18</guid><pubDate>Mon, 28 Sep 2009 09:10:10 GMT</pubDate></item><item><title>Ayende Rahien commented on Optimizing Windsor</title><description>SeeR,
  
I find code like that REALLY ugly.
  
And you make invalid assumption when you say that you know what the dependencies are.
  
In most big apps, you don't. They change, they are flexible.
</description><link>http://ayende.com/4202/optimizing-windsor#comment17</link><guid>http://ayende.com/4202/optimizing-windsor#comment17</guid><pubDate>Sat, 26 Sep 2009 20:44:42 GMT</pubDate></item><item><title>SeeR commented on Optimizing Windsor</title><description>Thats the thing I can't uderstand. Why should I register all my dependencies every time my application starts if all of them are known to me (as a developer) before compilation.
  
  
Here you can see how I used generics as static IoC.
  
  
[seermindflow.blogspot.com/.../...y-dependency.html](http://seermindflow.blogspot.com/2009/07/c-generics-free-but-ugly-dependency.html)</description><link>http://ayende.com/4202/optimizing-windsor#comment16</link><guid>http://ayende.com/4202/optimizing-windsor#comment16</guid><pubDate>Sat, 26 Sep 2009 20:33:14 GMT</pubDate></item><item><title>Erich Eichinger commented on Optimizing Windsor</title><description>Scott, do you experience any concrete issue? If so, please let us know. I didn't write specific tests for this yet, but since Spring.NET's wiring logic is quite different from Windsor's, I am not sure how much of the optimizations Oren did are applicable
</description><link>http://ayende.com/4202/optimizing-windsor#comment15</link><guid>http://ayende.com/4202/optimizing-windsor#comment15</guid><pubDate>Tue, 22 Sep 2009 10:17:21 GMT</pubDate></item><item><title>Chris Wright commented on Optimizing Windsor</title><description>Ayende,
  
That's entirely correct, if you're shoe-horning this onto an existing application using Castle Windsor. It's also true if you're registering all 500 components in one method. If you distribute the registration according to the structure of your application, it's tolerable, but a waste of time.
</description><link>http://ayende.com/4202/optimizing-windsor#comment14</link><guid>http://ayende.com/4202/optimizing-windsor#comment14</guid><pubDate>Fri, 18 Sep 2009 19:29:16 GMT</pubDate></item><item><title>Ayende Rahien commented on Optimizing Windsor</title><description>Scott,
  
I don't know.
  
The optimization is divided into two pieces.
  
First, change the way we handle resolving missing dependencies to avoid the requirement for a O(N^2) per registration
  
Second, aggressively cache resolution queries
</description><link>http://ayende.com/4202/optimizing-windsor#comment13</link><guid>http://ayende.com/4202/optimizing-windsor#comment13</guid><pubDate>Fri, 18 Sep 2009 14:50:48 GMT</pubDate></item><item><title>Scott White commented on Optimizing Windsor</title><description>just curious if similar optimizations could be made in Spring.Net's IoC, or if the same logic would apply
</description><link>http://ayende.com/4202/optimizing-windsor#comment12</link><guid>http://ayende.com/4202/optimizing-windsor#comment12</guid><pubDate>Fri, 18 Sep 2009 14:46:58 GMT</pubDate></item><item><title>Ayende Rahien commented on Optimizing Windsor</title><description>Chris,
  
That is usually not possible. If I have 500 components, just trying to figure out what the right order is is longer than the registration time.
</description><link>http://ayende.com/4202/optimizing-windsor#comment11</link><guid>http://ayende.com/4202/optimizing-windsor#comment11</guid><pubDate>Fri, 18 Sep 2009 14:23:17 GMT</pubDate></item><item><title>Chris Wright commented on Optimizing Windsor</title><description>Even so, it's better to register your components in an order that ensures the fewest number of components is awaiting dependencies at a time. CAB might have been onto something there :)
</description><link>http://ayende.com/4202/optimizing-windsor#comment10</link><guid>http://ayende.com/4202/optimizing-windsor#comment10</guid><pubDate>Fri, 18 Sep 2009 12:40:50 GMT</pubDate></item><item><title>Mike Scott commented on Optimizing Windsor</title><description>Ayende,
  
  
Ah, I see. This discussion seems to be degenerating into mathematics ;-) AFAIK with big O notation you're interested in how the algorithm varies with N. So constants, e.g. division by 2, don't vary and are thus dropped from the notation.
  
  
1,2,3...N is the canonical arithmetic sequence, the sum of which is given by N(N+1)/2. Since you're starting at zero, i.e. =N-1, the sum becomes N(N-1)/2.
  
  
OK, "normal programming service has been resumed..." ;-)
</description><link>http://ayende.com/4202/optimizing-windsor#comment9</link><guid>http://ayende.com/4202/optimizing-windsor#comment9</guid><pubDate>Fri, 18 Sep 2009 11:26:57 GMT</pubDate></item><item><title>Frank Quednau commented on Optimizing Windsor</title><description>Darius,
  
I suppose not that many people usually have that many distinct components served up by the DI container. that's the problem with exponential performance loss...
</description><link>http://ayende.com/4202/optimizing-windsor#comment8</link><guid>http://ayende.com/4202/optimizing-windsor#comment8</guid><pubDate>Fri, 18 Sep 2009 11:19:50 GMT</pubDate></item><item><title>Ayende Rahien commented on Optimizing Windsor</title><description>Mike,
  
Yes &amp; no.
  
a) you need to pay attention to what N represent (invalid components)
  
b) it isn't the same N.
  
  
Let us say we add 100 invalid components.
  
  
1st: O(0)
  
2nd: O(1)
  
3rd: O(2)
  
100: O(99)
  
  
I am not sure what the math symbol for that is.
  
It is usually close enough to O(N^2 / 2) * N, though.
  
  
I changed it so it would be O(N^2) without the Optimize and O(N) with the Optimize
</description><link>http://ayende.com/4202/optimizing-windsor#comment7</link><guid>http://ayende.com/4202/optimizing-windsor#comment7</guid><pubDate>Fri, 18 Sep 2009 10:36:03 GMT</pubDate></item><item><title>Mike Scott commented on Optimizing Windsor</title><description>To clarify, you're saying that the original algorithm was an O(N^2) operation for each of N components and you initially got this down to O(N)?
  
  
So in fact the registration of all components was N * O(N^2) = O(N^3) and you got it down to O(N^2)? No wonder it was taking so long for large numbers ;-)
</description><link>http://ayende.com/4202/optimizing-windsor#comment6</link><guid>http://ayende.com/4202/optimizing-windsor#comment6</guid><pubDate>Fri, 18 Sep 2009 10:29:55 GMT</pubDate></item><item><title>Darius Damalakas commented on Optimizing Windsor</title><description>Strange nobody else stumbled upon this.
  
And great that it is now improved! 
  
  
Thanks both for those who reported the bug, and who fixed it!
</description><link>http://ayende.com/4202/optimizing-windsor#comment5</link><guid>http://ayende.com/4202/optimizing-windsor#comment5</guid><pubDate>Fri, 18 Sep 2009 09:53:44 GMT</pubDate></item><item><title>Ayende Rahien commented on Optimizing Windsor</title><description>Ricardo,
  
Check the SVN log :-)
</description><link>http://ayende.com/4202/optimizing-windsor#comment4</link><guid>http://ayende.com/4202/optimizing-windsor#comment4</guid><pubDate>Fri, 18 Sep 2009 09:49:00 GMT</pubDate></item><item><title>Ricardo Peres commented on Optimizing Windsor</title><description>Just for curiosity, could you share with us the details of the optimization?
</description><link>http://ayende.com/4202/optimizing-windsor#comment3</link><guid>http://ayende.com/4202/optimizing-windsor#comment3</guid><pubDate>Fri, 18 Sep 2009 09:44:35 GMT</pubDate></item><item><title>Ayende Rahien commented on Optimizing Windsor</title><description>Dennis,
  
After they had some chance to sit in the trunk and we can see that they are stable.
</description><link>http://ayende.com/4202/optimizing-windsor#comment2</link><guid>http://ayende.com/4202/optimizing-windsor#comment2</guid><pubDate>Fri, 18 Sep 2009 09:42:50 GMT</pubDate></item><item><title>Dennis commented on Optimizing Windsor</title><description>When can we expect a release with this?
  
(We dont like running with the SVN version)
</description><link>http://ayende.com/4202/optimizing-windsor#comment1</link><guid>http://ayende.com/4202/optimizing-windsor#comment1</guid><pubDate>Fri, 18 Sep 2009 08:15:11 GMT</pubDate></item></channel></rss>