3 ms·
Shouldn't it be possible to make an sql structure and mount it like an FS to find out?
by Already__Taken 5y ago
Shouldn't it be possible to make an sql structure and mount it like an FS to find out?
- nightfly 5y agoThat would be the worst of both worlds: The overhead of storing your data in SQL, plus the overhead of filesystem search and access. The better way to do this would be to have node access the modules in SQLite directly.
- naikrovek 5y agofilesystem search and access is different when you're talking a single larger file versus multiple smaller files. All filesystems have a per-file overhead that would effectively be eliminated if you could pack all of your files into a database structure. Indices would also speed up access to individual rows of the table significantly. There is overhead in small file storage anyway, if the files are not the exact size, or a multiple, of the sector size. storing 1kb files on a disk where the sector size is 16kb is far more of an overhead expense than storing those files in an SQL database.
- mirekrusin 5y agoI was thinking more about using ESM loader hooks [0] directly. [0] https://nodejs.org/api/esm.html#esm_loaders https://nodejs.org/api/esm.html#esm_loaders