From: Kyle Schmitt Date: 2009-03-05T04:43:38+09:00 Subject: Re: Compiling a Ruby app On Wed, Mar 4, 2009 at 12:58 PM, Randall Alexander wrote: > The Spring Framework uses a lot of reflection yet many would not call it > trivial.  We use reflection in our enterprise because it is the best way to > solve a problem. Fair enough. I never argued that it wasn't the best way to solve some problems, just that the last time I used a heavily reflected compiled app (2007?) it was a dog. I should have made it more clear that in my experiences were with .Net applications. > If your runtime engine does look aheads (which many modern ones do) then the > interpreter can have the class evaluated and loaded before it is ever used. > One of the factors of that working is the size of the class and everything > the class needs.  We ran a few tests for our enterprise and determined that > if the class was not a heavy weight class then there was no real performance > penalty (i.e. response time). Ironically it actually speed things up over Ahh. The ones I was working in had some pretty heavy classes. Maybe reflection wasn't the best way then. I dunno. Would you say that a caveat for efficient reflection is fairly light-weight classes? --Kyle