Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Wojtek Newsgroups: comp.lang.java.programmer Subject: Re: The first 10 files Date: Sat, 26 Jan 2013 15:42:55 -0800 Organization: A noiseless patient Spider Lines: 33 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15"; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="92c3b945ba89fdf5072f2811ba779245"; logging-data="24287"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6fdva00QTRReLv2O2H20v/g+uyJYZw2I=" X-Newsreader: MesNews/1.08.03.00-gb Cancel-Lock: sha1:e4FopOETpL6KnonszOzZc7dU85I= Xref: csiph.com comp.lang.java.programmer:21761 John B. Matthews wrote : > Although it may be beyond your control, you should also critically > assess a design having tens of thousands of files in a single > directory. Well of course. The directory holds files which are uploaded by external events. If there are a lot of events between application runs, then the number of files can indeed reach large numbers. Since this is happening on a server, and you cam potentially have many hundreds of people accessing at the same time (each with there own directory), I was hoping to be able to "stage" file processing. The: public boolean accept(File pathname) { return maxFiles-- > 0; } in FileFilter is interesting, but the file system nevertheless still runs through the entire directory. Maybe FileFilter needs: public boolean abort(File pathname); Hmm, maybe I need a timed background process to move files to "holding" directories which will be limited to a small number of files. -- Wojtek :-)