Small optimizations (#74)#265
Conversation
* Optimize VisitMethodCall() * Optimize Provider constructor * Use Array.Empty<T>() instead of allocating Empty array * Get rid of unused PriorityQueue<> class * VisitNullable()
No public classes deletions allowed, make it [Obsolete]. Removing the test for this collection is OK, though. |
| /// <param name="type">The type of the provider.</param> | ||
| /// <param name="sources"><see cref="Sources"/> property value.</param> | ||
| protected Provider(ProviderType type, params Provider[] sources) | ||
| protected Provider(ProviderType type, IReadOnlyList<Provider> sources) |
There was a problem hiding this comment.
Can you explain what was the problem here? Native array is better, isn't it?
Was it for safety reasons so user code wouldn't be able to change items?
This is a breaking change which generates a breaking change of the ExecutableProvider ctor, so I need to evaluate its pros.
There was a problem hiding this comment.
The only reason: make Provider.Sources readonly collection
|
Optimize VisitMethodCall()
Optimize Provider constructor
Use Array.Empty() instead of allocating Empty array
Get rid of unused PriorityQueue<> class
VisitNullable()