Opened 12 years ago
Last modified 12 years ago
#1774 closed task
Getting instances of generic types through the ApplicationManager is slow when the debugger is attached — at Version 1
Reported by: | abeham | Owned by: | mkommend |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 3.3.7 |
Component: | PluginInfrastructure | Version: | 3.3.7 |
Keywords: | Cc: |
Description (last modified by abeham)
On my machine with the VS debugger attached, it takes roughly two minutes for the call to e.g. ApplicationManager.Manager.GetInstances<HeuristicOptimizationProblem<IEvaluator, ISolutionCreator>>() to complete (it should be equally slow for any generic type).
The performance issue seems to be in LightweightApplicationManager.CheckTypeCompatibility(Type type, Type other) as well as in the SandboxApplicationManager:
if (type.IsGenericType && other.IsGenericType) { try { if (type.IsAssignableFrom(other.GetGenericTypeDefinition().MakeGenericType(type.GetGenericArguments()))) return true; } catch (Exception) { } }
Without debugger attached there is no noticeable performance penalty. What is the reason for this rather steep drop in performance?
Change History (1)
comment:1 Changed 12 years ago by abeham
- Description modified (diff)
- Owner changed from gkronber to mkommend
- Status changed from new to assigned
Note: See
TracTickets for help on using
tickets.