On Thu, Oct 23, 2008 at 2:20 PM, Georg S. Weber <[EMAIL PROTECTED]> wrote: > > Hi, > > just a short update of my findings so far: > > 1.) Yes, on a Mac "fs_usage" is exactly the smoking gun needed. It > prints something like: > > > 22:30:15.446 stat [ 2] > coerce_maps.pyx > 22:30:15.446 stat [ 2] > coerce_maps.pyx > 22:30:15.446 stat [ 2] /Users/georgweber/ > Public/sage/sage-3.2.alpha0/loca/bin/coerce_maps.pyx > 22:30:15.446 stat [ 20] sage-3.2.alpha0/local/ > lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/coerce_maps.pyx > 22:30:15.446 stat [ 2] sage-3.2.alpha0/local/ > lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/coerce_maps.pyx > ... > > 2. The locations searched for "integer.pyx", "coerce_maps.pyx", and > "parent.pyx" in the example of Emmanuel above are exactly the current > directory, and then (starting again with the current directory) the > directories listed by > > sage: sys.path > > (so "stat" is called twice for coerce_maps.pyx without path in front > of it, as shown above). > > 3. Even the innocent line > > sage: time for i in range(10): float(1)/2 > > creates heavy "stat" call actictivity. > > 4. The .pyx files *are* side by side their accompagnying .so files, > under e.g .../site-packages/sage/rings/ one finds both the extension > "integer.so" as well as (a copy of) the source file "integer.pyx". > > 5. Since the functionality works (Sage does its computations), the .so- > files are obviously found when they are needed. So the mechanism which > searches for the .pyx-files must be a somewhat different one, because > it fails. > > 6. I still have no idea why "*.pyx"-files are looked after. Even in > devel/sage/setup.py, they don't really occur, because they are > replaced by their corresponding *.c resp. *.cpp files (by > "process_cython_file()") before setup() is called.
The only place in all sage that specifically uses the pyx files is the source code introspection. I.e., if you type sage: n = 5 sage: n.floor?? then Sage looks in integer.pyx to see the source code for the floor function. The pyx files shouldn't be used otherwise. > > > I'm too tired now to formulate the trac ticket, but the title would be > something like: > "sys.path is searched ("stat"ed) for *.pyx-files insanely often" > > Cheers, > gsw > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---