Changes between Initial Version and Version 1 of Ticket #2370, comment 7
- Timestamp:
- Mar 29, 2014, 4:10:46 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #2370, comment 7
initial v1 1 There should be at least a possibility for AIs not using ECs to avoid the costly update. An AI can route events directly to the relevant function/object by implementing an event dispatcher. If all AIs would use an event drivenprogramming model ECs are not required at all and consequently API + AIs would be faster.1 There should be at least a possibility for AIs not using ECs to avoid the costly update. An AI can route events directly to the relevant function/object by implementing an event dispatcher. If all AIs would use an [http://en.wikipedia.org/wiki/Event-driven_programming event driven] programming model ECs are not required at all and consequently API + AIs would be faster. 2 2 3 JavaScript is actually designed to support event driven applications . Browsers provide an API to register an event handler (callback), so that mouse clicks or moves are handled by the callback only. The current programming model used in the O A.D. AI API is comparable to browsers collecting all events in a list and let e.g. a menu search within this list whether the user clicked an entry or not. If the user hasn't clicked that's a very costly NOP.3 JavaScript is actually designed to support event driven applications with [http://en.wikipedia.org/wiki/First-class_function first class functions]. Browsers provide an API to register an event handler (callback), so that mouse clicks or moves are handled by the callback only. The current programming model used in the O A.D. AI API is comparable to browsers collecting all events in a list and let e.g. a menu search within this list whether the user clicked an entry or not. If the user hasn't clicked that's a very costly NOP.