Load module items once lazily in Launcher#1282
Conversation
Increases the performance when switching between modules in the launcher by caching module items and regions in the `IShellNavigator` service. This also removes recurring error logs caused by repeated assembly scans.
|
Could the static stuff be put into a simple singleton service? |
I think @1nf0rmagician dont want to refactor the whole ShellNavigator in this PR, but yes this sounds good in another PR |
+1 That was also my take on "I feel bad making the launcher config static, but it provides a significant benefit in the static Lazy context" which I missed to submit. |
Yes, just as you suggest @andreniggemann and yes to what @dbeuchler responded. Also, separating it into a cache service would make this an opt-in feature at best, as it would require modifying the application build section. This is however, is not what I want to got for, as I consider the error spaming in the log from the repeated reflection attempts very "sub-optimal" at best. |
Increases the performance when switching between modules in the launcher by caching module items and regions in the
IShellNavigatorservice. This also removes recurring error logs caused by repeated assembly scans.Note: I feel bad making the launcher config static, but it provides a significant benefit in the static Lazy context. Also the service is usually registered as a singleton and the config is one retrieved once from the config manager. Still, I'm open for suggestions to improve