Re: Need More ADO Suggestions
- From: "Jonathan Wood" <jwood@xxxxxxxxxxxxxxxx>
- Date: Mon, 3 Dec 2007 14:08:31 -0700
Cowboy,
Let's take the DataReader. You end up with a couple of choices.
1. You keep the connection open until you use the reader (expensive)
2. You pack the reader into objects or something else
I would shy away from #1, as it will ultimately kill you. If you do #2, you lose performance. The question is: Whose algorithm is faster, yours or Microsoft's? Can you pack objects quicker than a DataSet? If so, you may have more performant code, but you do so at the cost of a loss of maintainability. Is it worth it? It depends on the application.
Your point is well taken and I'm incorporating that into my thinking. Note that it's not that my algorithm is quicker than Microsoft's. Rather, my algorithm might not need all the functionality that Microsoft's more generic DataSet algorithm might employ. But, again, that's another dimension for me to consider.
In general, I find maintainability costs companies far more than performance. If I err, I will generally err on the side of maintainability. Now, there are times you need to focus on performanc up front, but I find it more common that you can find out if the application is below the bar using testing tools. If so, you are fine and there is no need to squeeze out a cycle or two. If not, you focus on the inner loop or other bits that are called over and over again in "normal" application use.
Well, before I used C++, I used C. And before that, I used assembler. Obviously, we all have different levels at where we are comfortable developing software. But, here, I think things are a little different because a successful site has the potential to slow down due to heavy usage. So, for a Website, I think performance might just be more important than ever before even when it doesn't seem to matter while under development. YMMV.
When you look at it, performance can be the enemy of scalability, maintainability and even security. Are you willing to throw all of these away for a few cycles? Possibly on some applications, but, in general, the answer is no.
I'm not interested in losing any of those. Hopefully, if I can understand the technology well enough, I won't have to.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
.
- References:
- Re: Need More ADO Suggestions
- From: Cowboy \(Gregory A. Beamer\)
- Re: Need More ADO Suggestions
- Prev by Date: Re: Need More ADO Suggestions
- Next by Date: Linq: #Temp tables in SPROCS do not have return values in generated methods
- Previous by thread: Re: Need More ADO Suggestions
- Next by thread: Re: Need More ADO Suggestions
- Index(es):
Relevant Pages
|