Ask Your Question
1

Profiling and select.select

asked 2013-06-04 03:49:39 +0200

bolverk gravatar image

updated 2013-06-04 04:01:53 +0200

I'm trying to profile my code using prun, and what I'm getting is that the lion's share of the time is spent in something called "select.select", which, according to pytho documentation has something to do with I/O. Now, the thing is I'm not using I/O at all, so why does sage call this function? How can I which function was calling select.select?

Here's the original prun output:

138462 function calls (132753 primitive calls) in 11.954 second
Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      588    8.607    0.015    8.607    0.015 {select.select}
        1    1.166    1.166    1.168    1.168 maxima_lib.py:929(to_poly_solve)
      946    0.658    0.001    0.658    0.001 {method 'search' of '_sre.SRE_Pattern' objects}
    40001    0.560    0.000    0.560    0.000 calculus.py:1925(<lambda>)
       23    0.318    0.014    1.021    0.044 {method 'parse_sequence' of 'sage.misc.parser.Parser' objects}
      231    0.245    0.001    0.288    0.001 maxima_lib.py:380(_eval_line)
       46    0.042    0.001    0.043    0.001 maxima_lib.py:242(max_to_string)
2332/1166    0.032    0.000    0.042    0.000 lazy_attribute.py:506(__get__)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-06-04 08:38:57 +0200

Volker Braun gravatar image

Maxima is being called to compute the answer. The select call is Sage waiting for Maxima to finish. If you want to profile this further you'd have to profile this within Maxima.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-06-04 03:49:39 +0200

Seen: 222 times

Last updated: Jun 04 '13