3

There is a free tool called PassMark AppTimer. But I think it's not quite fit for my needs.

Windows provides a tool called xperf, is there a way to use it to test/benchmark application startup time?

2
  • 1
    Are you talking about measuring your own app (i.e. you have the source code) or a tool to test any application?
    – d91-jal
    Oct 12, 2009 at 11:21
  • A tool can do common test a kind of app performance/benchmark. I need the test to be accurate.
    – Ali
    Oct 15, 2009 at 4:56

1 Answer 1

1

If I'm helping to develop an app, and it gets too slow on startup (or any other phase), I just do this.

Common wisdom is that measuring performance of various routines is necessary for finding performance problems.

I go the other way - I locate the biggest problems (because their very slowness exposes them), and then I can roughly estimate how much time they take, if I care to. Here's an example of how it works.

The kinds of things I have found are, for example 1) fetching and converting strings from resources, which were in resources so that they could be internationalized, but did not really need to be internationalized, or 2) creating and deleting (along with serializing) deep data structures for no real reason in the process of setting up UI controls.

The things found are almost never what you might guess, so it is a mistake to guess. Just see what the process tells you.

The interesting thing about this is that the problem is almost never the kind of thing that profilers could easily tell you. The problem is nearly always some innocent-looking function or method call, somewhere in the middle of the call stack, that only gets your attention because 1) it shows up a lot, and 2) by looking at what it is doing and why, you can see that it can be done without. Getting rid of it saves as much time as it was on the stack.

2
  • If the C++ application running on windows, xperf connecting to MS public symbol server can analyze the root cause of slowing parts, it likes debuging. Thank you for your method.
    – Ali
    Oct 15, 2009 at 5:02
  • @Ali: I can't count the times people have thought they had to buy, install, learn, make use of, and then puzzle over the output of a profiler, when I just hit the "pause" button on the IDE a few times and Bingo! there was the problem for all to see, and the PC was in Windows, but the fault was mid-stack, in our code. Happens every time. Every single time. Oct 15, 2009 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.