perf: add in-memory repo index with pagination

- Add repo_index.rs with lazy rebuild on write operations
- Double-checked locking to prevent race conditions
- npm optimization: count tarballs instead of parsing metadata.json
- Add pagination to all registry list pages (?page=1&limit=50)
- Invalidate index on PUT/proxy cache in docker/maven/npm/pypi

Performance: 500-800x faster list page loads after first rebuild
This commit is contained in:
2026-01-31 15:59:00 +00:00
parent 8da3eab734
commit eb77060114
10 changed files with 712 additions and 106 deletions

6
Cargo.lock generated
View File

@@ -1201,7 +1201,7 @@ checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21"
[[package]]
name = "nora-cli"
version = "0.2.12"
version = "0.2.18"
dependencies = [
"clap",
"flate2",
@@ -1215,7 +1215,7 @@ dependencies = [
[[package]]
name = "nora-registry"
version = "0.2.12"
version = "0.2.18"
dependencies = [
"async-trait",
"axum",
@@ -1253,7 +1253,7 @@ dependencies = [
[[package]]
name = "nora-storage"
version = "0.2.12"
version = "0.2.18"
dependencies = [
"axum",
"base64",