Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [profiling]

The tag has no usage guidance.

2
votes
2answers
97 views

How to profile before optimising for readability

When optimising for speed, profiling first can help focus the effort on the parts of the code that bring most benefit. Since speed can be measured objectively, the benefit can also be measured ...
1
vote
2answers
188 views

How to benchmark software performance under same conditions (RAM, CPU caching etc)?

I am writing a software that splits big files into smaller files and I have coded several solutions. I am measuring the execution time of each of my solutions. (with threads, go routines, MPI etc) ...
1
vote
2answers
2k views

WPF application architecture

I have written a WPF app which is now starting to suffer. There is no real way of adding new features to it in it's current state, it has become sluggish to use. This application started as a demo ...
1
vote
0answers
80 views

When virtual scrolling/pagination meets incremental search

I am developing an AngularJS app, and the server side PHP, step by step, implementing features and then polishing them. I currently periodically request data from the server, of the order of a few ...
0
votes
1answer
113 views

How to profile my code using my own class that measure time?

So I working on a project and want to profile my code. I have been using KCachegrind to get general idea of what functions cost the most. But now I want to get the exact time spent on those particular ...
2
votes
0answers
105 views

How to determine the reason why Firefox has poor performance on my web application?

I am developing a complex web application, which is working fine on Chrome and IE, but recently has developed huge performance issues on Firefox which lead us to block it's usage completely to avoid a ...
7
votes
2answers
693 views

Do I get valid profiling results with optimization turned off?

I use perf to profile my application. To make interpretation of the resulting call graph easier, I partitioned my core loops using label functions like maptable_appendRange that can be easily searched ...
1
vote
1answer
608 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-...
-10
votes
1answer
997 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(){ ...
0
votes
1answer
159 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: ...
1
vote
0answers
38 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
1k 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
1answer
232 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 ...
10
votes
4answers
15k 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 ...
11
votes
1answer
1k 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 ...
5
votes
1answer
3k 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 ...
4
votes
2answers
267 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 ...
3
votes
1answer
3k 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 ...
1
vote
1answer
274 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 ...
6
votes
1answer
892 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 ...
4
votes
6answers
1k 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 ...
6
votes
4answers
1k 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 ...
5
votes
1answer
193 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 ...
3
votes
1answer
1k 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
238 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 ...
5
votes
6answers
720 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
2k 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, ...
2
votes
2answers
653 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 ...
7
votes
5answers
1k 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 ...
22
votes
11answers
1k 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 ...
9
votes
11answers
418 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 most ...
7
votes
2answers
7k 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/...
7
votes
2answers
202 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 ...