#4366: sys.path is searched ("stat"ed) for *.pyx-files insanely often
-------------------------+--------------------------------------------------
 Reporter:  GeorgSWeber  |       Owner:  somebody
     Type:  defect       |      Status:  new     
 Priority:  major        |   Milestone:  sage-3.2
Component:  coercion     |    Keywords:          
-------------------------+--------------------------------------------------
 Hi, Emmanuel Thomé noted that
 there is a speed/system call activity regression in between Sage 3.0.5 and
 3.1.3.
 If in Sage 3.1.3/3.1.4/3.2.alpha0 one issues something like
 {{{
 sage: time for i in range(10): float(1)/2
 }}}
 and looks at the same at the system call activity of this python
 "sage.bin" process (in another terminal with something like "strace -p
 'pidof sage.bin' -e trace='stat'" under Linux, or using "sudo fs_usage
 4711" under Mac OS X, 4711 being the sage.bin pid gotten e.g. via the
 activity tool), then one sees:

 The (sage/python) sys.path is searched by the system call "stat" for
 "coerce.pyx", "coerce_maps.pyx", "parent.pyx" and "integer.pyx" many
 times, that whole path, and over and over again.

 This does not happen under Sage 3.0.5.

 Willem Jan Palenstijn proposed this code fragment, which triggers the
 behaviour in Sage 3.2.alpha0, too:
 {{{
 sage: cm=sage.structure.element.get_coercion_model()
 sage: cm.canonical_coercion(float(1),1)
 }}}
 and noted that

 "This seems to be the _record_exception() function in the coercion model."

 (See also the recent sage_devel thread started by Emmanuel Thomé about
 this.)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4366>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to