contextfree / winrt-rust

Use and (eventually) make Windows Runtime APIs with Rust
Apache License 2.0
142 stars 10 forks source link

Cache activation factories #34

Open Boddlnagg opened 7 years ago

Boddlnagg commented 7 years ago

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 commented 6 years ago

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 commented 6 years ago

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