YUI 3.7.0pr1 发布,事件处理性能提升
openkk 12年前
<p>YUI 3.7.0pr1 发布,该版本大幅提升了自定义事件处理的性能,达 3 倍之多。</p> <p>下面是在 Chrome 21/MacOS 下的测试结果:</p> <table border="1" cellpadding="10"> <thead> <tr> <th>测试项</th> <th>YUI 3.6.0</th> <th>YUI 3.7.0pr1</th> </tr> </thead> <tbody> <tr> <td>Fire with Payload – no listeners</td> <td><strong>34,412</strong> ops/sec</td> <td><strong>66,432</strong> ops/sec</td> </tr> <tr> <td>Fire with Payload – 2 listeners</td> <td><strong>30,030</strong> ops/sec</td> <td><strong>62,484</strong> ops/sec</td> </tr> <tr> <td>Publish (with attribute event config)</td> <td><strong>129,728</strong> ops/sec</td> <td><strong>371,997</strong> ops/sec</td> </tr> </tbody> </table> <p> </p> <p>测试的脚本在:<a href="/misc/goto?guid=4958523342982298968">src/event-custom/tests/benchmark/</a></p> <p>下载地址:<a href="/misc/goto?guid=4958523343072079637" target="_blank">yui_3.7.0pr1.zip</a></p> <p>官方发行说明:<a href="/misc/goto?guid=4958523343163154889" target="_blank">http://www.yuiblog.com/blog/2012/08/31/yui-3-7-0pr1-event-performance/</a></p>