The tag has no usage guidance.

learn more… | top users | synonyms

22
votes
11answers
807 views

Is it always wrong to optimize before profiling? [duplicate]

I see the mantra of "profiling before optimization" repeated again and again here, on SO, and elsewhere. Although I certainly use profiling tools, I'm only occasionally surprised by the results. It ...
8
votes
4answers
7k views

How to find bottlenecks in an application? [duplicate]

I'm building an application with lots of components, a lot of which are third-party so I only know what I can get from their documentation. From time to time, by pure luck, I find out one of these ...
8
votes
10answers
364 views

Where do you optimize?

There are two areas to possibly optimize for speed in: Where the most time is spent The code that is called the most Which is the best place to start optimizing? Often code that is called the ...
7
votes
2answers
178 views

When profiling a function for time use, what information is desirable?

I'm writing a program similar to Python's timeit module. The idea is to time a function by executing it anywhere from 10 to 100,000 times depending on how long it takes and then report results. I've ...
6
votes
1answer
671 views

How to see what parts of your code are run most often?

I would like to be able to see what code in thousands of lines of source code is run most often and takes the longest. The purpose of this would be for optimization. Being able to see what parts of ...
6
votes
4answers
765 views

Does profiling without benchmarking lead to micro-optimization?

Read first: For a definition of the two terms ("profiling" and "benchmarking") and the need for distinguishing them, please read this answer to a previous question. I have to admit that until I saw ...
6
votes
1answer
521 views

Conditional attribute in XML - most concise solution?

I am tasked with setting up conditional profiling - a method of tagging chunks of XML with an attribute, which will then be used as a conditional value to extract subset of that XML. Have a look at ...
5
votes
6answers
692 views

How should I react to diminishing application performance?

Sometimes it comes to me that the biggest challenge for an engineer when he find his application getting worse in performance is lack of enough information. Imagine that you go through the weekly ...
5
votes
6answers
903 views

Is there any value in knowing the execution time for a unit test?

Is the execution time of a unit test useful for anything? Is a unit test an appropriate place for any sort of code profiling? Why or why not? Sample Use Case: Every unit test lists name, pass/fail, ...
5
votes
1answer
2k views

Is Node.js correct choice for JSON parsing and IO driven

My program should perform following task: It listen on http port after getting request it does following things. Connect to gearman Parse gearman payload to JSON (Upto 100 bytes) Connect to Redis ...
5
votes
2answers
3k views

Determining Cost of API Calls [closed]

[This is a cross-post originally posted by me in SO. I think the question is more appropriate here.] I was going through the adwords API and came across their rate sheet - http://code.google.com/apis/...
5
votes
1answer
181 views

Use of a profiler tool to aid in the analysis of a brute force algorithm in Java

I was asked to profile (using some tool, such as YourKit or JVisualVM) a couple of implementations of the Traveling Salesman Problem (find the minimum path that visits all the given set of cities), in ...
4
votes
3answers
695 views

Interpreting profiling results

I am practicing algorithm and data structures. Therefore, I keep profiling my programs. Here is an example output from gprof: Each sample counts as 0.01 seconds. % cumulative self ...
4
votes
2answers
225 views

Can profiling be used to verify if optimization was successful?

I know that profiling is useful to identify bottlenecks and determining what parts of the code require how much time to execute. The latter isn't always very easy to track in the midst of other paths ...
4
votes
6answers
693 views

Information about how much time in spent in a function, based on the input of this function [closed]

Is there a (quantitative) tool to measure performance of functions based on its input? So far, the tools I used to measure performance of my code, tells me how much time I spent in functions (like ...
3
votes
1answer
2k views

How can I profile database queries from PHP?

CodeIgniter has a very nice feature called a Profiler, which displays information at the foot of a page, information such as GET, Memory, POST data. It also shows database queries and how long they ...
2
votes
2answers
560 views

Why profile applications using AOP?

When tuning performance in a web application, I am looking for good and light-weight performance profiling tools to measure the execution time for each method. I know that the easiest profiling method ...
2
votes
1answer
857 views

VisualVM Sampling & Accuracy

It's been said in other questions that jvisualvm sampling works as a "lightweight" profiling tool by calculating metrics directly from Java stack frames. Its almost unanimously agreed that such a ...
1
vote
1answer
154 views

Does having so many macros (#define) increase compilation time due to prolonged pre-processing?

In a very simplistic way, I understand: "Compilation" = "Pre-processing" + "Parsing" + "Linking" + "Executable" All the macros and other such pre-processing directives are taken care at the "Pre-...
1
vote
1answer
189 views

How to cross-reference many character encodings with ASCII OR UTFx?

I'm working with a binary structure, the goal of which is to index the significance of specific bits for any character encoding so that we may trigger events while doing specific checks against the ...
1
vote
1answer
238 views

Good example of gprof, for iOS project

The GNU profiler gprof, can be used to profile any application right on the device, allowing real world profiling. As Xcode 4.5 based on LLVM plus it has GNU Debugger, Profiler, and others. I need ...
1
vote
1answer
618 views

Will JVisualVM degrade application performance?

I have doubts in JVisual VM profiler tool related to performance. I have requirement to implement a JVM Monitoring tool for my enterpise java application. I have gone through some profiling tools in ...
1
vote
0answers
32 views

How can I test for performance issues in a specific piece of code? [duplicate]

I've inherited a problem from a programmer that isn't with our group anymore - a piece of our application suffers from performance issues under a particular set of circumstances. I can replicate ...
1
vote
1answer
220 views

Common diagnostics which VisualVM is used for

There's a lot of documentation out there on how to use the 'jvisualvm' profiler, but very little (if any) real-life advice on how to analyze all those charts and dumps. I'm just a little overwhelmed ...
0
votes
0answers
37 views

Profiling a java application making a lot of external http calls

I am having a java application which makes a lot of external http calls. To identify the hot methods I have used System.currentTimeMillis() in all methods and I observed that the methods who are ...
0
votes
0answers
55 views

Where do you put your profiling code?

I just developed an algorithm and additional to the usual unit tests I wrote a profiling "test" that I was using to measure and optimize its performance. It is structured similar to a test (arrange: ...
-7
votes
1answer
200 views

Java: Why's this For-Loop thousands of times slower?

So I have a simple method I'm calling millions of times a second, and I noticed that it was taking 16% of all processing time!! The offensive routine is as follows: public void placeHolder(){ ...