4 ms·
Storing many small files into few (compressed) bundle files is common since at least the 90's for storing game assets, but usually not with SQLite, but some sor
by flohofwoe 9y ago
Storing many small files into few (compressed) bundle files is common since at least the 90's for storing game assets, but usually not with SQLite, but some sort of compressed format (simple zip archives are quite common but there are faster alternatives now). The bundling gives you better overall compression, and faster read performance compared to individual files (at least on Windows) as long as you open the file only once, and from then on only seek and read.
SQLite is a big code base, using a simple archive file format instead gives you most of the advantages, but without the bloat.
PS: This is mostly for read-only situations though. Using SQLite probably starts to make sense when the applications needs to write to and create new files in the archive.
- rusanu 9y agoBut that would work only for static content, like the game assets. The discussion of BLOBs vs. filesystem comes up mostly in the context of content management and user/app uploaded content.
- flohofwoe 9y agoYes you are right. I wrote the 'PS' before I saw your comment. Apologies :)
- JabavuAdams 9y agoI was going to make a semi-sarcastic comment along the same lines, but some other authors rightly point out the benefit of using and RDBMS when then file schema is changing.