Hello. I noticed that the sqlite code looks like below. On windows this will result in 5 system calls instead of 1 each time the journal is made. Why not batch it all together into a single write?
/Ludvig rc = sqlite3OsWrite(&pPager->jfd, aJournalMagic, sizeof(aJournalMagic)); if( rc==SQLITE_OK ){ /* The nRec Field. 0xFFFFFFFF for no-sync journals. */ rc = write32bits(&pPager->jfd, pPager->noSync ? 0xffffffff : 0); } if( rc==SQLITE_OK ){ /* The random check-hash initialiser */ sqlite3Randomness(sizeof(pPager->cksumInit), &pPager->cksumInit); rc = write32bits(&pPager->jfd, pPager->cksumInit); } if( rc==SQLITE_OK ){ /* The initial database size */ rc = write32bits(&pPager->jfd, pPager->dbSize); } if( rc==SQLITE_OK ){ /* The assumed sector size for this process */ rc = write32bits(&pPager->jfd, pPager->sectorSize); }