Performance costs of reflection
So Sahil Malik decided to see just how slow reflection is.
S.B.Chatterlee chimed in saying that reflection can be useful despite the cost.
Using Reflection – balancing the issue with ‘loose coupling’
hmmmmmm, this all sounds very familiar.
The cost of reflection
Reflection Is It Worth The Cost?
Performance analysis of reflection
I think most all of these performance tests are kind of like the weather in Hawaii. It’s interesting, sometimes, to know but it only really matters if you are in Hawaii. It’s the same with performance tests. It’s interesting to see how things perform in very sterile test environments. But the only performance tests that matter are the ones that you run on code you mean to put into production. In my opinion, if you are accessing a file system, and that includes a database, you can stop worrying about in-memory performance issues. Concentrate on making your access to the file system as efficient as possible before you worry about thousandths of a second on reflection. Sure you don’t want to slow things down anymore than you have to; I’m just saying don’t lose any sleep over it. Remember you don’t get paid to refactor endlessly, you get paid to ship code. I use reflection in a web plugin framework that I wrote at work to set a value on a specified web control. I don’t know the type of the web control at compile time so I have to reflect over it. There is so much database access going on in the page the plugins are loaded on that the cost of reflection is meaningless.



Pingback: CodeBetter.Com Link Blog
Pingback: Lazycoder » Blog Archive » Language performance doesn’t matter when a database is involved