U4-9576 - Scannable plugin types should implement a marker interface, then PluginManager should scan for all plugins once instead of multiple times for each type

Created by Shannon Deminick 28 Feb 2017, 22:16:19 Updated by Jeavon Leopold 15 Aug 2017, 09:29:53

Relates to: U4-10213

To save on startup time, it would be much better to have a single marker interface that is used for all scannable types (especially ones for startup), this means assembly scanning happens one time instead of multiple times. Benchmarks show that this improves startup time by at least 500ms (which is a lot in startup land).

This PR also changes some legacy resolvers to be lazy resolvers so they are not scanned during startup since they are not even required.


Shannon Deminick 28 Feb 2017, 22:51:15

PR: https://github.com/umbraco/Umbraco-CMS/pull/1771

Stephan 06 Mar 2017, 07:52:53

Worked on this over the weekend.

Found a few classes that were not IDiscoverable.

Did lots of cleanup of PluginManager to optimize some needlessly complex Linq queries, index the caches, etc. Plenty of little things that each contribute to it being faster & cleaner.

Changed the cache file from being an Xml file (which requires parsing) to being a plain text file (faster).

All tests green. Assigning to you for review.

Shannon Deminick 29 Mar 2017, 05:44:58

@zpqrtbnk i think we should re-target this for 7.6 instead of a patch release, what do you think? I'm hesitant to pull this in to 7.5.12

Shannon Deminick 03 Apr 2017, 11:17:36

@zpqrtbnk have assigned back to you if you can look at my latest changes:

  • Ensures that all things that should be IDiscoverable are
  • Fixes the Ordinal casing check since that is what it was before
  • ensure we don't write to the cache file if we don't scan
  • removes the cache:false flags for some types since otherwise we'd scan for them when we don't have to
  • removes the very silly logic in IAction to rescan types

Stephan 03 Apr 2017, 11:45:42


Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.6.0

Sprint: Sprint 56

Story Points: