mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Optimise file lookups and other database operations
FirstOrDefault when called on a TableQuery with a predicate doesn't use table indices
This commit is contained in:
@ -62,7 +62,7 @@ namespace osu.Game.Rulesets
|
||||
{
|
||||
var us = createRulesetInfo(r);
|
||||
|
||||
var existing = Query<RulesetInfo>().FirstOrDefault(ri => ri.InstantiationInfo == us.InstantiationInfo);
|
||||
var existing = Query<RulesetInfo>().Where(ri => ri.InstantiationInfo == us.InstantiationInfo).FirstOrDefault();
|
||||
|
||||
if (existing == null)
|
||||
Connection.Insert(us);
|
||||
|
Reference in New Issue
Block a user