Skip to content

Commit 2e17afc

Browse files
authored
release: v1.3.0 with improved performance on engine & blob store (#163)
1 parent 0f61eba commit 2e17afc

File tree

6 files changed

+68
-3
lines changed

6 files changed

+68
-3
lines changed

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,38 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.3.0] - 2025-10-20
6+
7+
### Added
8+
- **Crypto-only module:** New `:safebox-crypto` published as a standalone artifact. ([#110](https://github.com/harrytmthy/safebox/issues/110))
9+
- **SafeBoxCrypto helper & ByteArray APIs:** String-in/string-out helper plus raw `ByteArray` encrypt/decrypt to avoid Base64/UTF-8 overhead. ([#121](https://github.com/harrytmthy/safebox/issues/121), [#152](https://github.com/harrytmthy/safebox/issues/152))
10+
- **Segmented blob store growth:** Removes the 1 MiB ceiling via multi-page mapping with compaction/reuse of freed space. ([#133](https://github.com/harrytmthy/safebox/issues/133))
11+
- **Recovery journal:** Append-only `SafeBoxRecoveryBlobStore` for ENOSPC/low-storage conditions with exponential-backoff replay. ([#134](https://github.com/harrytmthy/safebox/issues/134))
12+
- **Kotlin BCV & API guard:** Binary compatibility validator + pre-push API check. ([#131](https://github.com/harrytmthy/safebox/issues/131))
13+
14+
### Changed
15+
- **Public API cleanup:** Removed alias-based parameters. Creation now manages aliases internally. ([#111](https://github.com/harrytmthy/safebox/issues/111))
16+
- **Fully synchronous commits:** `.commit()` now guarantees durability of all affected pages + channel before returning. ([#161](https://github.com/harrytmthy/safebox/issues/161))
17+
18+
### Performance
19+
- **Batched `.apply()` pipeline:** Debounced batching that coalesces rapid edits/deletes, reducing I/O floods during bursts while keeping `.commit()` semantics predictable. ([#55](https://github.com/harrytmthy/safebox/issues/55), [#156](https://github.com/harrytmthy/safebox/issues/156))
20+
- **Lower contention in crypto:** Isolated ChaCha providers so key/value ciphers don’t block each other. ([#117](https://github.com/harrytmthy/safebox/issues/117))
21+
- **Adaptive flush in blob store:** One `force()` per updated page with adaptive behavior—eager for tiny blocking writes, batched for multi-page updates. ([#150](https://github.com/harrytmthy/safebox/issues/150), [#154](https://github.com/harrytmthy/safebox/issues/154))
22+
- **Smaller dependency footprint:** Switch to `bcprov-jdk15on` and minimal keep rules, making minified apps ≈9.5× smaller than before ([#115](https://github.com/harrytmthy/safebox/issues/115))
23+
24+
### Fixed
25+
- **Read latency regression:** Restored fast read path performance discovered during RC testing. ([#161](https://github.com/harrytmthy/safebox/issues/161))
26+
- **Single DEK per file:** Both ciphers for a file reliably resolve the same DEK (per-file locking + lazy load). ([#119](https://github.com/harrytmthy/safebox/issues/119))
27+
- **Corrupted-byte handling:** Scan/trim trailing corruption and resume from a clean boundary after partial writes/shutdowns. ([#148](https://github.com/harrytmthy/safebox/issues/148))
28+
- **R8 errors:** Remove LDAP/X.509 pulls and missing-class warnings while keeping ChaCha20-Poly1305 intact. ([#115](https://github.com/harrytmthy/safebox/issues/115))
29+
- **Recovery flow robustness:** Partial delete in recovery store + exponential backoff replay. ([#143](https://github.com/harrytmthy/safebox/issues/143))
30+
31+
### Docs
32+
- **Why SafeBox table:** Clearer comparison vs `EncryptedSharedPreferences`. ([#146](https://github.com/harrytmthy/safebox/issues/146))
33+
34+
### Deprecated
35+
- **SafeBoxState** and **SafeBoxStateListener:** Removal planned in v1.4. ([#125](https://github.com/harrytmthy/safebox/issues/125))
36+
537
## [1.3.0-rc01] - 2025-10-17
638

739
### Added

README.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ Compared to EncryptedSharedPreferences:
5555

5656
```kotlin
5757
dependencies {
58-
implementation("io.github.harrytmthy:safebox:1.3.0-rc01")
58+
implementation("io.github.harrytmthy:safebox:1.3.0")
5959

6060
// Optional: standalone crypto helper
61-
implementation("io.github.harrytmthy:safebox-crypto:1.3.0-rc01")
61+
implementation("io.github.harrytmthy:safebox-crypto:1.3.0")
6262
}
6363
```
6464

@@ -146,6 +146,39 @@ Average times measured over **100 samples** on an emulator:
146146

147147
<details open>
148148

149+
<summary>📊 v1.3.0 Benchmark</summary>
150+
151+
![Get Performance](docs/charts/v1_3_get_performance_chart.png)
152+
153+
![Put Performance](docs/charts/v1_3_put_performance_chart.png)
154+
155+
![Put then Commit Performance](docs/charts/v1_3_put_and_commit_performance_chart.png)
156+
157+
| Operation | SafeBox v1.3.0 | EncryptedSharedPreferences |
158+
|-----------------------------|------------------------------|----------------------------|
159+
| Initialization | **0.19ms** (*201.1× faster*) | 38.7ms |
160+
| Get 1 entry | **0.01ms** (*76.9× faster*) | 0.50ms |
161+
| Get 3 entries | **0.02ms** (*68.5× faster*) | 1.27ms |
162+
| Get 5 entries | **0.03ms** (*76.8× faster*) | 2.25ms |
163+
| Get 10 entries | **0.06ms** (*66.4× faster*) | 4.07ms |
164+
| Put 1 entry, then commit | **0.17ms** (*7.8× faster*) | 1.31ms |
165+
| Put 3 entries, then commit | **0.46ms** (*4.7× faster*) | 2.16ms |
166+
| Put 5 entries, then commit | **0.73ms** (*4.5× faster*) | 3.32ms |
167+
| Put 10 entries, then commit | **1.46ms** (*4.3× faster*) | 6.28ms |
168+
169+
Even on **multiple single commits**, SafeBox remains faster:
170+
171+
| Operation | SafeBox v1.3.0 | EncryptedSharedPreferences |
172+
|---------------------------|-----------------------------|----------------------------|
173+
| Commit 3 single entries | **0.52ms** (*9.5× faster*) | 4.90ms |
174+
| Commit 5 single entries | **0.85ms** (*8.2× faster*) | 6.91ms |
175+
| Commit 10 single entries | **1.71ms** (*6.6× faster*) | 11.27ms |
176+
| Commit 100 single entries | **16.51ms** (*4.3× faster*) | 71.34ms |
177+
178+
</details>
179+
180+
<details>
181+
149182
<summary>📊 v1.2.0 Benchmark</summary>
150183

151184
![Get Performance](docs/charts/v1_2_get_performance_chart.png)

build-logic/convention/src/main/java/PublishingConventionPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class PublishingConventionPlugin : Plugin<Project> {
2525
override fun apply(target: Project) {
2626
with(target) {
2727
group = "io.github.harrytmthy"
28-
version = "1.3.0-rc01"
28+
version = "1.3.0"
2929

3030
pluginManager.apply("org.jetbrains.dokka")
3131
pluginManager.apply("com.vanniktech.maven.publish")
105 KB
Loading
98.8 KB
Loading
120 KB
Loading

0 commit comments

Comments
 (0)