winrt-rust
winrt-rust copied to clipboard
Cache activation factories
We currently call RoGetActivationFactory()
on every single (wrapped) constructor or static function call.
This should be optimized by caching activation factories. An explanation of what's done in the modern C++ projection is given in https://kennykerr.ca/2016/11/24/cppwinrt-optimizing-activation/
We should then also do some benchmarks similar to the ones shown here: https://blogs.windows.com/buildingapps/2016/11/28/standard-c-windows-runtime-cwinrt/
See also the factory_cache
type in base.h
in C++/WinRT