This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: An intolerably slow behavior during a cascade of constructor calls


Isselmou dellahy wrote:

> The magnitude of the problem is such that, the same program compiled on 
> Linux and run on a similar machine, runs in 4 seconds while it needs more 
> than 10 minutes on cygwin.
> 
> Here's a tentative minimal program that failed though to reproduce the slow 
> behavior (probably because I do not load any big file).

It might be more useful if you would share a minimal program that
reproduced the problem you are referring to.  Nothing in this code seems
particular problematic with regards to performance efficiency.

The way to figure out these sorts of problems quickly are to use the
debugger (gdb) in the usual manner (try just hitting Ctrl-C sometime
during the 'hang' while running under the debugger), or the profiler, gprof.

If you haven't used gprof before, check out its manual (info gprof) and
try it out.  To get started quickly, just run a series of commands such as:

g++ -pg -o your_program your_program.cpp  # The -pg option enables
                                          # profiling.

./your_program                            # Run your program normally.
                                          # It will generate a file
                                          # named gmon.out.

gprof your_program                        # gprof will output
                                          # human-readable profiling

                                          # information.

Generally speaking, the debugger and the profiler should be your first
resort when confronted with this catagory of problem.  However, this is
not specific to your particular problem or Cygwin.  Someone else on this
list might be able to provide you with more information.

Aaron W. LaFramboise


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]