Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Profiling and select.select

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", to which I could find no reference. Any ideas what it is?

Here's the original prun output:

ncalls  tottime  percall  cumtime  percall filename:lineno(function)
 550    9.321    0.017    9.321    0.017 {select.select}

Profiling and select.select

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 I could find no reference. Any ideas what it is?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)
 550    9.321    0.017    9.321    0.017      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__)