Click here to Skip to main content
15,904,155 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.

 
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 
I rarely use profilers, but there are a few cases when even good programmers may have trouble seeing where code is slow. Sometimes there may be a library call which you think will be fast, but turns out to be slow. This could be due to system call(s) that take longer than the programmer realizes or due to the library function's algorithm working very differently than the programmer realized. We all make assumptions about things that sometimes aren't true. One very big issue is using something like using strlen(some_string) as a constant in a C program. Many programmers use that as though it is a constant in the compiler's mind, when it may not be (GCC has an __attribute__ that lets the compiler see that it is, but it's not standard). That's the kind of thing that could end up in a loop, possibly as part of the loop check, without many programmers realizing that it's a problem. While you might see that code, there are similar circumstances which are less obvious. These are often the results of invisible code introduced by compilers for languages higher than C. Overloaded operators, copy constructors, and destructors can all have much more impact on code than programmers realize. Knowing what kinds of things your language may hide is a good way to avoid these, but some things still slip through.
Other things that are easy to miss is how contentious locks, semaphores, mutexes, and other blocking operations are. These are difficult to figure out sometimes.
There are also times when you need to demonstrate to someone else where the bottle necks in code are. If your cocky junior programmer weren't your subordinate but rather your boss then the output of a profiler would be something that you could use to combat the cockiness. This is particularly useful when you get "Your code is slow! Fix it!" and you can come back with "This external code/hardware/whatever, which isn't under my control, is what is slow."
Another time when using a profiler would be very useful would be if there were disagreement or uncertainty over which of multiple parts of a program were responsible for the different amounts of the slowness. Maybe you need to prioritize the order in which these are addressed. For you or I it may be obvious that a section of code is slower than it has to be, but when comparing two suboptimal sections of code it is very often that eyeballs alone are not enough.
There are also times when a profiler can be used to find bugs that would take a lot of stepping in a debugger to locate.
AnswerRe: Does anybody really use a Profiler? Pin
patbob15-Sep-14 5:22
patbob15-Sep-14 5:22 
GeneralRe: Does anybody really use a Profiler? Pin
nategoose7-Oct-14 6:36
nategoose7-Oct-14 6:36 
AnswerRe: Does anybody really use a Profiler? Pin
SkysTheLimit15-Sep-14 7:37
SkysTheLimit15-Sep-14 7:37 
GeneralRe: Does anybody really use a Profiler? Pin
SledgeHammer0115-Sep-14 8:22
SledgeHammer0115-Sep-14 8:22 
GeneralRe: Does anybody really use a Profiler? Pin
KP Lee15-Sep-14 17:13
KP Lee15-Sep-14 17:13 
GeneralRe: Does anybody really use a Profiler? Pin
SledgeHammer0115-Sep-14 18:33
SledgeHammer0115-Sep-14 18:33 
GeneralRe: Does anybody really use a Profiler? Pin
nategoose7-Oct-14 6:49
nategoose7-Oct-14 6:49 
AnswerRe: Does anybody really use a Profiler? Pin
KP Lee15-Sep-14 16:36
KP Lee15-Sep-14 16:36 
AnswerRe: Does anybody really use a Profiler? Pin
Chad3F17-Sep-14 12:10
Chad3F17-Sep-14 12:10 
RantPNG Problem Pin
Bassam Abdul-Baki13-Sep-14 9:46
professionalBassam Abdul-Baki13-Sep-14 9:46 
GeneralRe: PNG Problem Pin
Afzaal Ahmad Zeeshan13-Sep-14 10:03
professionalAfzaal Ahmad Zeeshan13-Sep-14 10:03 
GeneralRe: PNG Problem Pin
Bassam Abdul-Baki13-Sep-14 10:34
professionalBassam Abdul-Baki13-Sep-14 10:34 
JokeRe: PNG Problem Pin
Brisingr Aerowing13-Sep-14 16:00
professionalBrisingr Aerowing13-Sep-14 16:00 
GeneralRe: PNG Problem Pin
Andy Brummer13-Sep-14 16:18
sitebuilderAndy Brummer13-Sep-14 16:18 
GeneralRe: PNG Problem Pin
Bassam Abdul-Baki15-Sep-14 0:47
professionalBassam Abdul-Baki15-Sep-14 0:47 
QuestionRe: PNG Problem Pin
Chad3F17-Sep-14 12:18
Chad3F17-Sep-14 12:18 
AnswerRe: PNG Problem Pin
Bassam Abdul-Baki18-Sep-14 12:36
professionalBassam Abdul-Baki18-Sep-14 12:36 

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.