#7690: maxima stats too many files on startup, which is a performance issue
------------------------+---------------------------------------------------
   Reporter:  was       |       Owner:  tbd       
       Type:  defect    |      Status:  new       
   Priority:  blocker   |   Milestone:  sage-4.3.1
  Component:  packages  |    Keywords:            
Work_issues:            |      Author:            
   Upstream:  N/A       |    Reviewer:            
     Merged:            |  
------------------------+---------------------------------------------------
 {{{
 Hi,

 This email is a followup about  "1. maxima opens the root directory /
 and stats each file found there. Then it does the same thing for the
 /u (home) directory..."

 Thanks to everybody that responded to my query below.  The
 "MAXIMA-SHAREDIR" variable looks fine according to the output of
 "maxima --directories".
 Off list, Andrej Vodopivec remarked "It could be share-subdirs-list in
 init-cl.lisp. If that is true, then it should be easy to remove the
 call to share-subdirs-list.".    I tried doing what Andrej suggested,
 and it worked perfectly.  Before doing that, Maxima would state about
 4000 files (including all users' home directories) on startup, and
 afterwards it stat'd only about 70 files.   The difference in
 performance on some NSF filesystems is huge -- a second versus
 potentially *minutes*.    Even the difference on
 sage.math.washington.edu is quite noticeable (a very fast machine with
 a fast network).  Looking at the output of makes this very clear:

    strace maxima --directories  > out 2>&1; grep stat out|wc -l


 For now we'll be patching the Maxima in Sage so that
 share-subdirs-list (in init-cl.lisp) falls back to the old "default
 behavior" instead of the new behavior that was introduced in the
 recent rewrite of init-cl.lisp.    I really hope whoever rewrote
 init-cl.lisp can think about the significant performance regression
 that was caused, and find a better solution.

 Thanks again for all the incredibly helpful feedback!

  -- William
 }}}

 By the way, what I did to init-cl.lisp was stupid.  I changed
 {{{
 #+ecl
 (defun share-subdirs-list ()
   ;; This doesn't work yet on windows.  Give up in that case and use
   ;; the default list.
   (if (string= *autoconf-win32* "true")
 }}}
 to
 {{{
 #+ecl
 (defun share-subdirs-list ()
   ;; This doesn't work yet on windows.  Give up in that case and use
   ;; the default list.
   (if (string= *autoconf-win32* "false")
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7690>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--

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