Re: Create empty files?
- From: Victor Porton <porton.victor@xxxxxxxxx>
- Date: Tue, 5 Jan 2010 12:55:01 -0800 (PST)
On Jan 5, 10:45 pm, Sjouke Burry <burrynulnulf...@xxxxxxxxxxxxxxxxx>
wrote:
Victor Porton wrote:
On Jan 5, 10:19 pm, Mensanator <mensana...@xxxxxxx> wrote:
On Jan 5, 12:20 pm, Victor Porton <por...@xxxxxxxx> wrote:
An application uses files with IDs.Because empty files are not "empty" as far as the directory is
What of the following two variants is preferred?
1. To create empty IDs files at setup script.
2. If an IDs file is missing, treat it as if it would exist but empty..
Why?
concerned.
You should first answer first of my questions and only then the
second!
From what you say about my second question, I assume that your answer
to the first question is:
2. If an IDs file is missing, treat it as if it would exist but empty.
The directory entry may not point to anything, but it takes up space.
A directory block can typically only hold 512 entries. When the
directory
gets larger than that, a new block must be allocated. Very likely this
will result in a fragmented directory, making it much more difficult
to scan through. This may not be applicable to all OSes, I remember it
from observing some clown who put thousands of files into a single
directory
and then wondered why it was slower than snake shit.
A few bytes of free space isn't a concern for the particular
application which I write.
Also adding to the source code processing of non-existing files would
probably eat comparable quantity of bytes as would creation of these
files.
I'm more interested in programming beautify and clarity than in a few
bytes of free space.
Does anybody else have an opinion on my question?
Why?? Your opinion seems firmly set.
My opinion is not set nor on "1" nor or "2".
I ask all what is YOUR preferred choice: "1" or "2":
1. To create empty IDs files at setup script.
2. If an IDs file is missing, treat it as if it would exist but empty.
.
- References:
- Create empty files?
- From: Victor Porton
- Re: Create empty files?
- From: Mensanator
- Re: Create empty files?
- From: Victor Porton
- Re: Create empty files?
- From: Sjouke Burry
- Create empty files?
- Prev by Date: Re: Create empty files?
- Next by Date: Re: Create empty files?
- Previous by thread: Re: Create empty files?
- Next by thread: Re: Create empty files?
- Index(es):
Relevant Pages
|