divyang4481 / firebreath

Automatically exported from code.google.com/p/firebreath
0 stars 0 forks source link

FireEvent is too slow; optimize it #165

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Those firing a lot of events very quickly find that the performance of the 
event firing mechanism is less than expected; this can be improved.

Allowing for the possibility of more than one type of BrowserHost, we can group 
event handlers going to the same host by grouping them by context id.  If we 
then pass a list of JSObjects to fire the event on instead of calling 
InvokeAsync on each one we can do the conversion to the browser's datatype once 
for all event handlers and then reuse that argument list for each handler we 
call; thus we only do that type conversion once per browserhost (in most cases 
just one) instead of once pre event handler registered.

This should be particularly meaningful in cases where an array or object are 
passed back to javascript; instead of creating one copy of the object or array 
per handler it will use the same for all handlers, which is much more efficient.

Original issue reported on code.google.com by richarda...@gmail.com on 8 Mar 2011 at 10:41

GoogleCodeExporter commented 8 years ago
Moved to http://jira.firebreath.org/browse/FIREBREATH-6

Original comment by taxilian on 14 Mar 2011 at 7:10