UNPKG

igir

Version:

🕹 A zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS.

48 lines (47 loc) • 1.47 kB
class Defaults { /** * A reasonable max of filesystem threads for operations such as: * @example * Promise.all([].map(async (file) => fs.lstat(file)); */ static MAX_FS_THREADS = 100; /** * Default number of DATs to process at once. */ static DAT_DEFAULT_THREADS = 2; /** * A reasonable max number of files to write at once. */ static FILE_READER_DEFAULT_THREADS = 6; /** * Max number of archive entries to process (possibly extract & MD5/SHA1/SHA256 checksum) at once. */ static ARCHIVE_ENTRY_SCANNER_THREADS_PER_ARCHIVE = this.FILE_READER_DEFAULT_THREADS / 2; /** * A reasonable max number of ROM release candidates to write at once. This will be the limiting * factor for consoles with many small ROMs. */ static ROM_WRITER_DEFAULT_THREADS = this.FILE_READER_DEFAULT_THREADS / 2; /** * The number of additional retry attempts to write a file if the write or test fails. */ static ROM_WRITER_ADDITIONAL_RETRIES = 2; /** * Max number of files to recycle/delete at once. */ static OUTPUT_CLEANER_BATCH_SIZE = 100; /** * Max {@link fs} highWaterMark chunk size to read and write at a time. */ static FILE_READING_CHUNK_SIZE = 64 * 1024; // 64KiB, Node.js v22 default /** * Max size of file contents to store in memory vs. temp files. */ static MAX_MEMORY_FILE_SIZE = 64 * 1024 * 1024; // 64MiB } export { Defaults as default }; //# sourceMappingURL=defaults.js.map