3 ms·
If you're writing twice, you don't care about the performance to begin with. Or the size of the files being produced. But if you're writing indices, there's a
by shakna 1y ago
If you're writing twice, you don't care about the performance to begin with. Or the size of the files being produced.
But if you're writing indices, there's a good chance that you do care about performance.
- charcircuit 1y agoFiles are often authored once and read / used many times. When authoring a file performance is less important and there is plenty of file space available. Indices are for the performance for using the file which is more important than the performance for authoring it.
- shakna 1y agoIf storage and concern aren't a concern when writing, then you probably shouldn't be doing workarounds to include the index in the file itself. Follow the dbm approach and separate both into two different files. Which is what dbm, bdb, Windows search indexes, IBM datasets, and so many, many other standards will do.
- charcircuit 1y agoSeparate files isn't always the answer. It can be more awkward to need to download both and always keep them together compared to when it's a single file.