You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An immediate performance improvement would be to cache the PropertyInfo and setter as a delegate and the attributes for the target POCO, like how HyperDescriptor or FastMember or Fasterflect and the ORM Entity Framework does it.
I'm writing a library that is using some heavy hitting WMI queries and it's the mapping part that's adding a time delay. In my particular business case it goes from .002 to .05 for a particular operation. It's not bad from a human user perspective but it would be nice to keep it in the thousandths of a second range for the operation, because in my particular use case and code architecture I can't use an event watcher and have to run my operation in a tight blocking loop.
Although I don't know how to improve iterating over ManagementObjectCollection. That also adds a heavy delay but that's just WMI. Someone suggests using ManagementClass on MSDN. Also maybe analyzing the target POCO and removing irrelevant properties from the query automatically may be of some use, but the consumer can already handle that.
The text was updated successfully, but these errors were encountered:
Frozenthia
changed the title
Adding caching and performance improvements to the reflection
Adding caching and performance improvements to the mapping and reflection
Dec 30, 2019
An immediate performance improvement would be to cache the PropertyInfo and setter as a delegate and the attributes for the target POCO, like how HyperDescriptor or FastMember or Fasterflect and the ORM Entity Framework does it.
I'm writing a library that is using some heavy hitting WMI queries and it's the mapping part that's adding a time delay. In my particular business case it goes from .002 to .05 for a particular operation. It's not bad from a human user perspective but it would be nice to keep it in the thousandths of a second range for the operation, because in my particular use case and code architecture I can't use an event watcher and have to run my operation in a tight blocking loop.
Although I don't know how to improve iterating over ManagementObjectCollection. That also adds a heavy delay but that's just WMI. Someone suggests using ManagementClass on MSDN. Also maybe analyzing the target POCO and removing irrelevant properties from the query automatically may be of some use, but the consumer can already handle that.
The text was updated successfully, but these errors were encountered: