Open jkotas opened 3 years ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
cc @alpencolt
cc @dotnet/crossgen-contrib
Potentially contributes to https://github.com/dotnet/runtime/issues/44598
Mono should do this too. On platforms where quick startup is critical (Android, wasm), using precomputed layouts could be beneficial. Additionally we could presumably avoid global loader lock contention.
Quick startup is also critical on our Tizen products like wearable, TV, and so on. I really look forward to this feature because R2R cannot meet our launching time comparing to FNV currently. Thanks for your hard work. 👍
Are there any progress about this feature? After the latest .NET Runtime (FNV option removed) is applied for Tizen product, the startup time is increased. We hope that this feature will be developed soon.
The type loading involves non-trivial time-consuming algorithms such as field or vtable layout. We may be able to speed up the type loading by storing additional pre-computed information in the R2R images.
A possible design is to save just enough data to be able to build MethodTable very quickly, and teach the rest of the runtime to deal with MethodTables that do not have EEClass, MethodDescs or FieldDescs as they would be created on demand.
The data format should be resilient to versioning changes by default, with option to more efficiency via use of version bubbles.
Compact type layouts (CTL) was a similar idea used on Windows Phone. For inspiration, more details about CTL can be found in Patent # 10,656,926.