Various technical articles, IT-related tutorials, software information, and development journals
Wednesday, March 22, 2017
FMod - Event bus could be optimized
While looking through Abiathar's code, I noticed that the old event bus system (which has been there forever) could be a lot more efficient than it is. Currently, whenever an event is fired - a moderately common occurrence - Abiathar scans all methods on all loaded extension objects to see if the type signature matches. Reflection isn't the fastest thing, and the stops for the event bus will never change, so a better approach would be to scan for stops after loading all extensions, then run through that list whenever a bus should be driven. Alternatively, using the normal .NET event method would be far simpler, but changing to that now would break all existing extensions.
Labels:
abiathar
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment