[TIMOB-10462] iOS: Implement new bubbling architecture as prescribed in TIMOB-10372
| GitHub Issue | n/a |
|---|---|
| Type | Sub-task |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-10-05T22:40:18.000+0000 |
| Affected Version/s | Release 2.1.1 |
| Fix Version/s | Release 3.0.0, Sprint 2012-20 API, 2012 Sprint 20 |
| Components | iOS |
| Labels | api |
| Reporter | Blain Hamon |
| Assignee | Blain Hamon |
| Created | 2012-08-15T20:38:07.000+0000 |
| Updated | 2017-03-21T18:30:59.000+0000 |
Description
Now that TIMOB-10372 has been agreed upon, this needs to be put in place to support proper and consistent bubbling of events.
Attachments
| File | Date | Size |
|---|---|---|
| app.js | 2012-10-05T02:43:05.000+0000 | 4600 |
Is there any expectation as to when this functionality will be added? If not a date, then a version release? Thanks.
It's scheduled for version 3.0.
Note to self: https://github.com/BlainHamon/titanium_mobile/compare/timob-10462 Still need unit testing and checking for edge cases.
So a quick test of the performance change:
Before Timob-10462: [DEBUG] Events/second: 3193.8040345821328 [DEBUG] Events/second: 3293.451501723289 [DEBUG] Events/second: 3303.8886221795487 After Timob-10462: [DEBUG] Events/second: 3916.26213592233 [DEBUG] Events/second: 3960.4938271604938 [DEBUG] Events/second: 3953.232462173315 [DEBUG] Events/second: 3972.5400457665905 [DEBUG] Events/second: 3943.820224719101 [DEBUG] Events/second: 3970.925110132159 I'm happy with this. It's about 20% cooler.Titanium.UI.setBackgroundColor('#000'); var win = Titanium.UI.createWindow({backgroundColor:'white'}); var button = Ti.UI.createButton({title:'start', width:200,top:50,height:50}); var keepGoing; var startTime; var eventCount; button.addEventListener('increment',function(e){ eventCount++; if(keepGoing){ button.fireEvent('increment'); } }); button.addEventListener('click',function(e){ keepGoing = !keepGoing; if(keepGoing){ button.title='stop'; eventCount = 0; startTime=new Date(); button.fireEvent('increment'); } else { button.title='start'; var endTime=new Date(); Ti.API.debug('Events/second: ' + (eventCount * 1000 / (endTime.getTime() - startTime.getTime())) ); } }); win.add(button); win.open();Test app for, um, testing.
PR https://github.com/appcelerator/titanium_mobile/pull/3114
Closing ticket as fixed.