Skip to content

Commit

Permalink
Cap max busy poll to 100ms
Browse files Browse the repository at this point in the history
Updates #75
  • Loading branch information
zombiezen committed Feb 5, 2024
1 parent fb967a8 commit b351635
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

[Unreleased]: https://github.com/zombiezen/go-sqlite/compare/v1.1.1...main

## [Unreleased][]

### Changed

- Set the maximum time between busy polls to 100 milliseconds
(follow-on from [#75](https://github.com/zombiezen/go-sqlite/issues/75)).

## [1.1.1][] - 2024-02-02

Version 1.1.1 improves performance on write-contended workloads.
Expand Down
16 changes: 0 additions & 16 deletions sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,22 +348,6 @@ var busyDelays = [...]time.Duration{
50 * time.Millisecond,
50 * time.Millisecond,
100 * time.Millisecond,
250 * time.Millisecond,
250 * time.Millisecond,
500 * time.Millisecond,

1 * time.Second,
2 * time.Second,
5 * time.Second,
10 * time.Second,
15 * time.Second,
20 * time.Second,
25 * time.Second,
25 * time.Second,
25 * time.Second,
50 * time.Second,
50 * time.Second,
100 * time.Second,
}

var busyHandlers sync.Map // sqlite3* -> func(int) bool
Expand Down

0 comments on commit b351635

Please sign in to comment.