winrt-rust icon indicating copy to clipboard operation
winrt-rust copied to clipboard

Cache activation factories

Open Boddlnagg opened this issue 7 years ago • 2 comments

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/

Boddlnagg avatar Feb 27 '17 12:02 Boddlnagg

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/

Boddlnagg avatar Jul 13 '17 10:07 Boddlnagg

See also the factory_cache type in base.h in C++/WinRT

Boddlnagg avatar Jan 08 '18 15:01 Boddlnagg