Click here to Skip to main content
15,915,336 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Does anybody really use a Profiler? Pin
newton.saber13-Sep-14 14:51
newton.saber13-Sep-14 14:51 
GeneralRe: Does anybody really use a Profiler? Pin
SledgeHammer0113-Sep-14 15:11
SledgeHammer0113-Sep-14 15:11 
GeneralRe: Does anybody really use a Profiler? Pin
BillWoodruff13-Sep-14 18:24
professionalBillWoodruff13-Sep-14 18:24 
GeneralRe: Does anybody really use a Profiler? Pin
Member 1046259815-Sep-14 4:55
professionalMember 1046259815-Sep-14 4:55 
AnswerRe: Does anybody really use a Profiler? Pin
newton.saber13-Sep-14 14:07
newton.saber13-Sep-14 14:07 
GeneralRe: Does anybody really use a Profiler? Pin
SledgeHammer0113-Sep-14 14:27
SledgeHammer0113-Sep-14 14:27 
GeneralRe: Does anybody really use a Profiler? Pin
newton.saber13-Sep-14 14:46
newton.saber13-Sep-14 14:46 
AnswerRe: Does anybody really use a Profiler? Pin
Andy Brummer13-Sep-14 16:16
sitebuilderAndy Brummer13-Sep-14 16:16 
Yes a profiler can't always get you the stats you need. Like others said, they are useful for finding hotspots in large distributed applications. For example I worked on a large web based CRM system that had randomly had extremely slow page render times. The whole system used DataSets as core data objects that were associated with classes defined in C# code that was stored in the database and dynamically compiled.

Now, I could have gone in and manually instrumented several hundreds of methods and objects, but using a profiler I was able to find the slow spots in several of the subsystems including the process of compiling the data objects. It took a little experimentation to find out which of several approaches was fast enough. The worst offender ended up being really inefficient code in the site navigation that involved a bad caching implementation.

I'm skipping around to your last example. A memory profiler will find that issue pretty quickly, in addition you will have a significant amount of time in garbage collection when you look at performance counters. I also like to instrument my code with custom performance counters so I can monitor it in production easily.

Ok, the highest performance C# app I worked on was a click scoring web service that took web server log lines and had to return a score in 100ms or less. It peaked out at about 6,000 scores per second averaging less than 1ms average response time. The entire first stage involved mapping strings to ids using Dictionary<string, int=""> objects. Then there were a number of shared statistics that were maintained based on those integer lookups. Several hundred rules were run on all that computed data. That was combined with a naive bayes classifer, and the statistics were updated with the results of the scoring, and the score was returned to the client.

The first versions loaded data as needed, but eventually everything was hugely sped up by loading the entire database in memory as the first step and then generating all the ids in the client. Also writing data out to the database was done with sql batch update objects which out perform any kind of stored procedures by wide margins. But even then, stored procedures haven't been faster than inline sql for years.

Micro-optimization like you are talking about can get you a long ways, but at some point secondary effects like garbage collection, memory paging, working set management, cache lines, etc. are going to become issues especially when you are working with something like a 16 Gigabyte process size with .net. At that point you have to look at more global issues.

Curvature of the Mind now with 3D


AnswerRe: Does anybody really use a Profiler? Pin
BillWoodruff13-Sep-14 18:18
professionalBillWoodruff13-Sep-14 18:18 
AnswerRe: Does anybody really use a Profiler? Pin
Kornfeld Eliyahu Peter13-Sep-14 20:06
professionalKornfeld Eliyahu Peter13-Sep-14 20:06 
GeneralRe: Does anybody really use a Profiler? Pin
SledgeHammer0113-Sep-14 20:24
SledgeHammer0113-Sep-14 20:24 
GeneralRe: Does anybody really use a Profiler? Pin
Kornfeld Eliyahu Peter13-Sep-14 20:35
professionalKornfeld Eliyahu Peter13-Sep-14 20:35 
AnswerRe: Does anybody really use a Profiler? Pin
Nagy Vilmos13-Sep-14 20:40
professionalNagy Vilmos13-Sep-14 20:40 
AnswerRe: Does anybody really use a Profiler? Pin
harold aptroot13-Sep-14 20:54
harold aptroot13-Sep-14 20:54 
AnswerRe: Does anybody really use a Profiler? Pin
Mark_Wallace13-Sep-14 21:01
Mark_Wallace13-Sep-14 21:01 
AnswerRe: Does anybody really use a Profiler? Pin
wout de zeeuw13-Sep-14 22:09
wout de zeeuw13-Sep-14 22:09 
GeneralRe: Does anybody really use a Profiler? Pin
Nelek14-Sep-14 0:52
protectorNelek14-Sep-14 0:52 
AnswerRe: Does anybody really use a Profiler? Pin
Gary R. Wheeler14-Sep-14 3:01
Gary R. Wheeler14-Sep-14 3:01 
AnswerRe: Does anybody really use a Profiler? Pin
Pete O'Hanlon14-Sep-14 6:54
mvePete O'Hanlon14-Sep-14 6:54 
AnswerRe: Does anybody really use a Profiler? Pin
macu14-Sep-14 21:49
macu14-Sep-14 21:49 
AnswerRe: Does anybody really use a Profiler? Pin
dazfuller14-Sep-14 22:08
dazfuller14-Sep-14 22:08 
AnswerRe: Does anybody really use a Profiler? Pin
ScottM114-Sep-14 22:11
ScottM114-Sep-14 22:11 
AnswerRe: Does anybody really use a Profiler? Pin
Christophe Van Olmen15-Sep-14 2:00
professionalChristophe Van Olmen15-Sep-14 2:00 
GeneralRe: Does anybody really use a Profiler? Pin
PIEBALDconsult15-Sep-14 10:03
mvePIEBALDconsult15-Sep-14 10:03 
AnswerRe: Does anybody really use a Profiler? Pin
nategoose15-Sep-14 4:20
nategoose15-Sep-14 4:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.