I think this would be great. Do recursive dependencies get caught now? They didn't 6 months ago. For example, if I have a .pxd included (cimported, whatever) in another .pxd which is included in a .pyx: i.e. a.pxd -> b.pxd -> c.pxd -> c.pyx then modifications of a.pxd should trigger c.pyx to compile. We don't do a lot of this so it doesn't matter often, but when it does happen it can cause a great deal of developer confusion.
I have a sage tree with a patch for this somewhere in the back-waters of my harddrive, but it was costly to compute timewise (roughly doubled the no-op build) and I was too lazy to submit it. But if the cacheing could make this fast, I think we should fix this. -- Joel On Thu, Dec 06, 2007 at 06:47:12AM -0800, William Stein wrote: > > Hi, > > The patch trac1366.patch posted here: > > http://trac.sagemath.org/sage_trac/ticket/1366 > > by Bobby Moretti (with help from me and Carl Witty) > uses caching to make it so typing "sage -b" or "sage -br" > is faster. It needs more testing. > > For me on OSX. > > BEFORE (but after doing "sage -b" many times to get all the files into > the cache): > > $ ./sage -b > > real 0m7.276s > user 0m5.018s > sys 0m2.255s > > AFTER (again after doing "sage -b" many times): > > $ ./sage -b > > real 0m2.907s > user 0m2.021s > sys 0m0.888s > > > Note -- the first time you do "sage -b" may be slower while a cache is built. > > > So this makes "sage -b" over twice as fast. > > > That said, if you make this one change to setup.py: > > ----------------- > (udiff) > @@ -1113,7 +1113,7 @@ def cython(ext_modules): > pickle.dump(deps_of, deps_file) > deps_file.close() > > -if not sdist: > +if False and not sdist: > cython(ext_modules) > ----------------- > > i.e., turn of pyx dependency checking altogether, then we have > > $ ./sage -b > > real 0m0.934s > user 0m0.596s > sys 0m0.321s > > So I think there is still significant room for improvement. > In particular, it would make a lot of sense to do a first scan > through all the .pyx, .pxd, .pxi files to see if any have > changed. If none have changed, completely skip any cython-related > testing / caching / etc. If they have changed, proceed as with > Bobby's patch, noting that we're about to compile some code, > which will end up taking all the time anyways. Thus when > people are working on Python-only code "sage -br" will > be faster for them. > > -- > William Stein > Associate Professor of Mathematics > University of Washington > http://wstein.org > > --~--~---------~--~----~------------~-------~--~----~ 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-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
