Skip to content

Remove slower defer calls to improve INSERT performance #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Close context once
  • Loading branch information
mugikhan committed Apr 2, 2024
commit 8cf918cc26822c8c3b16b724e9af766ed723c232
1 change: 0 additions & 1 deletion src/setup-open.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export function setupOpen(QuickSQLite: ISQLite) {
closeContextLock(dbName, id);
resolve(res)
} catch (ex) {
closeContextLock(dbName, id);
reject(ex)
} finally {
hooks?.lockReleased?.()
Expand Down
3 changes: 2 additions & 1 deletion tests/tests/sqlite/rawQueries.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,8 @@ export function registerBaseTests() {
await db.execute('PRAGMA wal_checkpoint(RESTART)');
let end = performance.now();
let duration = end - start;
console.log(`10000 INSERTs :: ${duration}ms`);

expect(duration).lessThan(2000);
});
});
}