plotting slow in directories with many files

Hi,

I encountered this particular problem quite often now. If you use matplotlib
in a directory that contains a large number of files, things become
extremely slow after calling pylab.show(). I suspect the interface
internally lists all files in that directory?

I often have to plot from directories with huge amounts of data, is there a
way to change that behavior?

Regards,

Maximilian

···

--
View this message in context: http://old.nabble.com/plotting-slow-in-directories-with-many-files-tp29988783p29988783.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

matplotlib, under normal usage, doesn't list all files in the current directory. Can you provide the steps you perform before calling show()? What platform are you on, and which backend are you using?

Mike

···

On 10/18/2010 05:54 AM, mfabulous wrote:

Hi,

I encountered this particular problem quite often now. If you use matplotlib
in a directory that contains a large number of files, things become
extremely slow after calling pylab.show(). I suspect the interface
internally lists all files in that directory?

I often have to plot from directories with huge amounts of data, is there a
way to change that behavior?

Regards,

Maximilian
   
--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA

The only thing I could think of is that matplotlib.matplotlib_fname does:

    fname = os.path.join( os.getcwd(), 'matplotlibrc')
    if os.path.exists(fname): return fname

So if os.path.exists is slow for directories with many files, this
could be the culprit (though it would surprise me).

Maximilian, these lines are found in matplotlib/__init__.py -- you may
want to try commenting them out and rerunning to see if this helps
your issue.

JDH

···

On Mon, Oct 18, 2010 at 8:42 AM, Michael Droettboom <mdroe@...86...> wrote:

matplotlib, under normal usage, doesn't list all files in the current
directory. Can you provide the steps you perform before calling
show()? What platform are you on, and which backend are you using?\