Skip to content

Replace GitIndex with db dumps + SparseIndex#794

Merged
Mark-Simulacrum merged 1 commit intorust-lang:masterfrom
Mark-Simulacrum:reduce-memory
Aug 24, 2025
Merged

Replace GitIndex with db dumps + SparseIndex#794
Mark-Simulacrum merged 1 commit intorust-lang:masterfrom
Mark-Simulacrum:reduce-memory

Conversation

@Mark-Simulacrum
Copy link
Member

This reduces steady state memory usage for the server, in local testing, by several gigabytes, which should help us reduce instance size and/or cache more of the sqlite db pages in memory, possibly improving performance.

@Skgland
Copy link
Contributor

Skgland commented Aug 24, 2025

Would it maybe make sense to use the db-dump crate for this?

Library for scripting analyses against crates.io's database dumps

@Mark-Simulacrum Mark-Simulacrum added this pull request to the merge queue Aug 24, 2025
@Mark-Simulacrum
Copy link
Member Author

Mark-Simulacrum commented Aug 24, 2025

I don't think that crate handles zip file parsing, which lets us avoid downloading the full dump - we touch a small portion of it, I haven't measured but my guess is <50%.

And the logic isn't particularly complicated so I don't see much reason to add a dependency.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 24, 2025
@Mark-Simulacrum Mark-Simulacrum force-pushed the reduce-memory branch 3 times, most recently from 366fab9 to 775c24a Compare August 24, 2025 13:11
@Mark-Simulacrum Mark-Simulacrum added this pull request to the merge queue Aug 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 24, 2025
This reduces steady state memory usage for the server, in local testing,
by several gigabytes, which should help us reduce instance size and/or
cache more of the sqlite db pages in memory, possibly improving
performance.
@Mark-Simulacrum Mark-Simulacrum added this pull request to the merge queue Aug 24, 2025
Merged via the queue into rust-lang:master with commit 98133a1 Aug 24, 2025
3 checks passed
@Mark-Simulacrum Mark-Simulacrum deleted the reduce-memory branch August 24, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants