4
$\begingroup$

I'm using I need to load data in some files on a windows network share (samba), mounted on OSX. When listing the relevant directory in a shell, the performance is acceptable:

% time ls $DIR|wc -w
   26542
ls -G $DIR  0.05s user 0.33s system 98% cpu 0.376 total
wc -w  0.00s user 0.00s system 1% cpu 0.376 total

Compared to MMA:

In[36]:= fn = FileNames[All, dir]; // AbsoluteTiming

Out[33]= {30.8174, Null}

Compared to local MMA (for the same dir):

In[36]:= fn = FileNames[All, dir]; // AbsoluteTiming

Out[33]= {0.206, Null}

Edit

It seems that MMA is making an excessive amount of system calls since when listing the share mounted on (Windows 10) localhost is still very slow, though much faster:

In[36]:= fn = FileNames[All, dir]; // AbsoluteTiming

Out[33]= {2.502, Null}
$\endgroup$
3
  • $\begingroup$ I am almost certain that something very similar was already asked (possibly years ago), but I can't seem to find it. You might want to search the site a bit more, maybe something comes up. Also: I would definitely report this to Wolfram. $\endgroup$
    – Szabolcs
    Mar 18, 2020 at 9:39
  • $\begingroup$ This is the only related question I could find, unanswered: mathematica.stackexchange.com/questions/108103/… $\endgroup$
    – Carl Lange
    Mar 18, 2020 at 9:58
  • $\begingroup$ Neither could I find anything remotely similar except for what @CarlLange linked. $\endgroup$
    – Shwouchk
    Mar 18, 2020 at 20:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.