At present, the Event Engine uses Dictionaries quite extensively.
These can be a significant benefit when the number of Listeners subscribed to Events at any one time is sufficiently high, but actually produces lower performance when there are fewer. This is because a hash has to be performed for each lookup, and hashing takes time.
For smaller projects with fewer Listeners, a Binary Lookup may very-well be more efficient.
An IFDEF can switch between modes at compile-time, and I'm going to call it LKSL_EVENTENGINE_USEBINARYLISTS
When that Define is set, the Event Engine will use TLKSortedList instead of TLKDictionary... otherwise, TLKDictionary will be used (as it is presently).
NOTE: This define can temporarily (at least) be set for FreePascal to side-step the lack of functionality with TLKDictionary on FreePascal (at least until issue #80 is resolved).
This issue can only be completed after issue #93 has been completed.
At present, the Event Engine uses Dictionaries quite extensively. These can be a significant benefit when the number of Listeners subscribed to Events at any one time is sufficiently high, but actually produces lower performance when there are fewer. This is because a hash has to be performed for each lookup, and hashing takes time.
For smaller projects with fewer Listeners, a Binary Lookup may very-well be more efficient.
An IFDEF can switch between modes at compile-time, and I'm going to call it
LKSL_EVENTENGINE_USEBINARYLISTS
When that Define is set, the Event Engine will use
TLKSortedList
instead ofTLKDictionary
... otherwise,TLKDictionary
will be used (as it is presently).NOTE: This define can temporarily (at least) be set for FreePascal to side-step the lack of functionality with
TLKDictionary
on FreePascal (at least until issue #80 is resolved).This issue can only be completed after issue #93 has been completed.