mirror of
https://github.com/elicpeter/nyx.git
synced 2026-07-12 21:02:11 +02:00
Refactor database connection handling with connection pooling and parallel processing
- Introduced `r2d2` connection pooling for SQLite in `database.rs`. - Updated `Indexer` to use pooled connections for improved concurrency. - Replaced sequential processing with `rayon` for parallel file scanning. - Added a `clear` method to `Indexer` for reindexing support. - Enhanced database initialization with `init` and `from_pool` methods. - Updated `Cargo.toml` and `Cargo.lock` to include `r2d2`, `r2d2_sqlite`, and new dependencies.
This commit is contained in:
parent
1933082b41
commit
0a62b6f40c
5 changed files with 412 additions and 67 deletions
|
|
@ -28,3 +28,5 @@ blake3 = "1.8.2"
|
|||
once_cell = "1.21.3"
|
||||
console = "0.15.11"
|
||||
rayon = "1.10.0"
|
||||
r2d2_sqlite = "0.30.0"
|
||||
r2d2 = "0.8.10"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue