Commit Graph

48249 Commits

Author SHA1 Message Date
Bartłomiej Dach 7e68371d28
Move log statement about migration completed closer to rest of migration code 2022-01-22 14:20:28 +01:00
Bartłomiej Dach 1b2cca4a0d
Merge branch 'master' into realm-migration-ui 2022-01-22 13:52:19 +01:00
Bartłomiej Dach c99f227879
Remove no longer used resolved storage 2022-01-22 13:48:49 +01:00
Bartłomiej Dach 93a2a2df35
Merge pull request #16535 from peppy/realm-context-use-update-when-feasible
Add realm factory helper methods to run work on the correct context
2022-01-22 13:40:12 +01:00
Dean Herbert 25dbe6b27c Fix unused null assignment 2022-01-22 12:58:30 +09:00
Dean Herbert c9db0181d0 Attempt to fix test failures on windows due to context being held open 2022-01-22 12:24:05 +09:00
Dean Herbert a89954d67f Update benchmarks in line with new structure 2022-01-22 12:12:13 +09:00
Dean Herbert cdcf0947e6 Merge branch 'master' into realm-context-use-update-when-feasible 2022-01-22 12:09:18 +09:00
Dean Herbert 7025191fdd
Move target field outside of `Run` usage
Co-authored-by: Salman Ahmed <frenzibyte@gmail.com>
2022-01-22 12:02:44 +09:00
Dean Herbert b23f4674b1
Update outdated exception message
Co-authored-by: Salman Ahmed <frenzibyte@gmail.com>
2022-01-22 12:02:18 +09:00
Dean Herbert daed0b04dc Remove using statements 2022-01-22 11:54:40 +09:00
Dean Herbert 855ef3fa92 Create backup before any realm contexts are used 2022-01-22 11:52:46 +09:00
Bartłomiej Dach 2f6fc748b5
Merge pull request #16550 from peppy/realm-live-benchmarks
Add realm data access benchmarks
2022-01-21 20:39:06 +01:00
Dean Herbert 8ef50ff42d Add safety to ensure `RealmLiveUnmanaged` is not used with managed instances 2022-01-22 02:13:08 +09:00
Dean Herbert a2b6bc9e53 Add benchmark coverage of variuos methods of reading properties from realm 2022-01-22 02:13:08 +09:00
Dean Herbert 8f1dfa33a2 Merge branch 'master' into realm-context-use-update-when-feasible 2022-01-21 18:03:09 +09:00
Dean Herbert 495636538f Add forced refresh on `GetAllUsableBeatmapSets()`
This is commonly used in tests in a way where it's not feasible to
guarantee correct results unless a refresh is called. This method
shouldn't really be used outside of tests anyway, but that's for a
folow-up effort.
2022-01-21 17:33:29 +09:00
Dean Herbert 81b5717ae7 Fix `RealmLive` failing to retrieve due to lack of refresh 2022-01-21 17:33:03 +09:00
Dean Herbert d2655c0825 Fix `RealmLive` not necessarily being in refreshed state due to potentially using update context 2022-01-21 17:27:30 +09:00
Dean Herbert 114c9e8c1f Update all usages of `CreateContext` to use either `Run` or `Write` 2022-01-21 17:27:08 +09:00
Dean Herbert da0a803e6c Add `RealmContextFactory.Write` helper method 2022-01-21 17:08:05 +09:00
Dean Herbert a59105635e Make `CreateContext` private 2022-01-21 16:40:20 +09:00
Dean Herbert dde10d1ba2 Remove unused `IRealmFactory` interface 2022-01-21 16:38:07 +09:00
Dan Balasescu 202d0ea1fc
Merge pull request #16530 from peppy/carousel-performance-n
Improve carousel performance during imports and deletions
2022-01-21 16:12:20 +09:00
Dean Herbert 3bcdce128c Use dictionary add for safety 2022-01-21 15:29:21 +09:00
Dean Herbert ff4f40db8a Merge branch 'master' into carousel-performance-n 2022-01-21 15:27:42 +09:00
Dan Balasescu c4f24ef96c
Merge pull request #16542 from peppy/carousel-search-performance-less-simple
Avoid performing full filter when updating carousel beatmap sets
2022-01-21 15:05:30 +09:00
Dean Herbert 5622d2ba4f Show realm migration progress at `Loader` 2022-01-21 14:56:49 +09:00
Dean Herbert 5be41a189b Expose EF context factory for use in external migration logic 2022-01-21 14:56:28 +09:00
Dan Balasescu d6d9efae60
Merge pull request #16541 from peppy/carousel-search-performance-simple
Avoid performing keyword filtering at song select unless keywords are specified
2022-01-21 13:35:43 +09:00
Dean Herbert bed7b69464 Apply NRT to `CarouselGroup` 2022-01-21 13:26:29 +09:00
Dean Herbert 5b24800b0e Avoid applying filter in `UpdateBeatmapSet` flow 2022-01-21 13:26:25 +09:00
Dan Balasescu 10056e0dfd
Merge pull request #16532 from peppy/backup-before-opening-ef-context
Create backup of databases before opening contexts
2022-01-21 13:12:53 +09:00
Dean Herbert 45bf35c425 Avoid performing keyword filtering at song select unless keywords are specified 2022-01-21 12:26:24 +09:00
Dean Herbert a5d2047f05 Fix various cases of creating realm contexts from update thread when not necessary 2022-01-21 01:44:56 +09:00
Dean Herbert 0c9eb3ad61 Add realm factory helper methods to run work on the correct context
Avoids constructing a new `Realm` instance when called from the update
thread without worrying about disposal.
2022-01-21 01:33:47 +09:00
Dean Herbert 7aad2780b1 Add retry logic for realm backup creation 2022-01-21 00:46:53 +09:00
Dean Herbert 079b2dfc42 Create backup of databases before opening contexts
Attempt to avoid file IO issues.

Closes #16531.
2022-01-21 00:46:53 +09:00
Dean Herbert ba31ddee01 Revert `beatmapSets` reference to fix tests
New version changed order.
2022-01-21 00:34:12 +09:00
Dean Herbert 80f3a67876 Use `for` instead of `foreach` to avoid enumerator overhead 2022-01-20 22:21:00 +09:00
Dean Herbert 0b93f3c88f Add `<Guid,CarouselBeatmapSet>` dictionary to speed up update operations in carousel 2022-01-20 22:12:49 +09:00
Dean Herbert 9a864267d2 Fix `CarouselGroupEagerSelect` not invoking subclassed `AddChild` from `AddChildren` calls 2022-01-20 21:57:16 +09:00
Dean Herbert a8ce2c5edf Detach before sending `BeatmapSetInfo` to any handling method 2022-01-20 21:14:10 +09:00
Dan Balasescu 1a20725162
Merge pull request #16529 from peppy/fix-realm-subscription-overhead
Remove all calls to `Realm.Refresh` to fix blocking overhead from subscriptions
2022-01-20 20:58:11 +09:00
Dan Balasescu c986c1b702
Merge pull request #16523 from peppy/realm-async-carousel-load
Use asynchronous loading for beatmap carousel again
2022-01-20 20:55:48 +09:00
Dean Herbert 5df46d0a54 Remove all calls to `Realm.Refresh` to fix blocking overhead from subscriptions
Turns out this is not required if realm is aware of a
`SynchronizationContext`. See
https://github.com/realm/realm-dotnet/discussions/2775#discussioncomment-2005412
for further reading.
2022-01-20 20:23:18 +09:00
Dean Herbert b1cf3befa6 Fix incorrect query in comment 2022-01-20 18:36:20 +09:00
Dan Balasescu cab63830a1
Merge pull request #16527 from peppy/remove-parameterless-beatmapinfo-ctor-usage
Avoid constructor allocation/GC overhead in realm implicit constructors
2022-01-20 18:11:35 +09:00
Dan Balasescu 2da8d8a279
Merge pull request #16528 from peppy/remove-detach-collection
Remove unnecessary detach operation
2022-01-20 18:11:22 +09:00
Dean Herbert 3ba712703b Add a note about hidden beatmap check 2022-01-20 17:50:17 +09:00