octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #50416] dir command is very slow with large di


From: Avinoam Kalma
Subject: [Octave-bug-tracker] [bug #50416] dir command is very slow with large directories
Date: Tue, 28 Feb 2017 00:22:12 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?50416>

                 Summary: dir command is very slow with large directories
                 Project: GNU Octave
            Submitted by: avinoam
            Submitted on: Tue 28 Feb 2017 05:22:11 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Performance
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: Microsoft Windows

    _______________________________________________________

Details:


For example:


base = 'C:\Temp\test';  ## 1740 files
N = 20;
S = 0;
for i=1:N
  tic
  fnames = dir(fullfile(base,'*.png'));
  len = length (fnames);
  S = S + toc;
end

disp (S/N);


Running on Win-7

in Matlab: 0.0045 
in Octave: 0.728


Octave is 160 times slower.
Indeed, there is a fixme line in dir.m:


## FIXME: This is quite slow for large directories.
##        Perhaps it should be converted to C++?






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50416>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]