3 ms·
You've never heard two programmers arguing over which method of doing x is quicker? I've mainly worked commercially in .Net and the worst and virtually pointle
by mattmanser 16y ago
You've never heard two programmers arguing over which method of doing x is quicker?
I've mainly worked commercially in .Net and the worst and virtually pointless one has to be using stringbuilder versus simple concatenation.
I've also seen people get crazy with passing around things like SqlConnection objects as they didn't realize .Net handles all that in the background.
Or people agonizing over small names for css classes while the asp.net viewstate is the same size as the whole of the html. Ugh.
The bottleneck shifting to the code as you're describing has been in my experience very rare, usually the problem with the DB is poor indexes/missing FKs or escalating row/page/table locks which don't translate into a bottleneck in the actual data processing code.
- btilly 16y agoI've never worked in .Net, but I know that in Java there is a huge performance difference when building a long string incrementally. If there are n pieces, using stringbuilder is O(n) while concatenation is O(n * n). When you're building a large web page, the difference is worth paying attention to.