Bug 56022 - Improve the static registrar to generate code that does not need any reflection at runtime
Summary: Improve the static registrar to generate code that does not need any reflecti...
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools (show other bugs)
Version: master
Hardware: PC Mac OS
: High enhancement
Target Milestone: 15.7
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks: 33863 43985 53207 60597
  Show dependency tree
 
Reported: 2017-05-05 07:56 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2018-03-14 12:12 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Rolf Bjarne Kvinge [MSFT] 2017-05-05 07:56:42 UTC
Currently we still do some reflection at runtime, even when the static registrar is used.

We can improve this to make all reflection unnecessary. In fact I believe it's possible to make it so that nothing is done at startup, all information needed at runtime is loaded when needed, and not before.

This will minimize the minimum memory requirements for our apps (the less we do the less memory we use), and also make startup faster.
Comment 1 Sebastien Pouliot 2017-05-15 19:01:41 UTC Comment hidden (obsolete)
Comment 2 Sebastien Pouliot 2017-05-15 19:04:06 UTC Comment hidden (obsolete)
Comment 3 Rolf Bjarne Kvinge [MSFT] 2017-09-15 11:54:24 UTC
Additionally try to make the dynamic registrar code linker-friendly (so that it's linked away).
Comment 4 Rolf Bjarne Kvinge [MSFT] 2017-09-21 08:36:57 UTC
A consequence of removing all needs for reflection would be that the linker would be able to remove the ProtocolMember attributes.
Comment 5 clintoncraigsmith 2017-10-03 19:10:55 UTC
Do we have an ETA for this ticket?
Comment 6 Rolf Bjarne Kvinge [MSFT] 2017-10-04 09:18:29 UTC
There's no firm ETA yet, but we're prioritizing it.

Unfortunately it's not a trivial fix, there's a fair amount of work required.
Comment 7 Sebastien Pouliot 2018-01-05 14:27:43 UTC
15.6 milestone turned out to be shorter than originally expected, new target is 15.7
Comment 8 Sebastien Pouliot 2018-02-26 14:22:28 UTC
This was done over several PR - the main one was #3495