You've already forked AstralRinth
forked from didirus/AstralRinth
perf(labrinth/random_projects_get): speed up through spatial queries according to profiling results (#3762)
This commit is contained in:
committed by
GitHub
parent
858c7e393f
commit
a3839461cf
@@ -519,6 +519,9 @@ impl ProjectStatus {
|
||||
}
|
||||
|
||||
// Project can be displayed in search
|
||||
// IMPORTANT: if this is changed, make sure to update the `mods_searchable_ids_gist`
|
||||
// index in the DB to keep random project queries fast (see the
|
||||
// `20250609134334_spatial-random-project-index.sql` migration)
|
||||
pub fn is_searchable(&self) -> bool {
|
||||
matches!(self, ProjectStatus::Approved | ProjectStatus::Archived)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user