Upgrade to Pro — share decks privately, control downloads, hide ads and more …

YUI 3.10.0 — Go Fast

YUI 3.10.0 — Go Fast

Some details and fancy charts showing the performance improvements coming in YUI 3.10.0.

Cf33841918d90fe941f522dde5ee4ff0?s=128

Eric Ferraiuolo

April 12, 2013
Tweet

Transcript

  1. YUI 3.10.0 Go Fast @ericf

  2. 0 50,000 100,000 150,000 200,000 153,532 51,871 ops/sec 3.8.1 3.10.0pr1

    Y.BaseCore
  3. 0 12,500 25,000 37,500 50,000 48,067 13,696 ops/sec 3.8.1 3.10.0pr1

    Y.Base
  4. 0 2,750,000 5,500,000 8,250,000 11,000,000 10,810,890 2,330,865 ops/sec 3.8.1 3.10.0pr1

    Y.Base#get()
  5. 0 100,000 200,000 300,000 400,000 332,063 74,202 ops/sec 3.8.1 3.10.0pr1

    Y.Base#set()
  6. 0 7,500 15,000 22,500 30,000 28,722 12,900 ops/sec 3.8.1 3.10.0pr1

    Y.MyModel w/ 2 ATTRS
  7. 0 150,000 300,000 450,000 600,000 531,777 261,855 ops/sec 3.8.1 3.10.0pr1

    Y.EventTarget#publish()
  8. 0 1,500,000 3,000,000 4,500,000 6,000,000 5,139,582 839,048 ops/sec 3.8.1 3.10.0pr1

    Y.EventTarget#fire() – 0L
  9. 0 100,000 200,000 300,000 400,000 351,084 160,905 ops/sec 3.8.1 3.10.0pr1

    Y.EventTarget#fire() – 2LP
  10. 3.10.0pr1 http://stage.yuilibrary.com/

  11. 3.10.0pr1 http://stage.yuilibrary.com/

  12. Back-Compat Known “Issues”

  13. Touching ATTRS Y.Foo = Y.Base.create('foo', Y.Base, [], {}, { ATTRS:

    { bar: {value: 'bar'} } });
  14. Touching ATTRS Y.Foo = Y.Base.create('foo', Y.Base, [], {}, { ATTRS:

    { bar: {value: 'bar'} } });
  15. Touching ATTRS Y.Foo = Y.Base.create('foo', Y.Base, [], {}, { ATTRS:

    { bar: {value: 'bar'} } }); var foo1 = new Y.Foo();
  16. Touching ATTRS Y.Foo = Y.Base.create('foo', Y.Base, [], {}, { ATTRS:

    { bar: {value: 'bar'} } }); var foo1 = new Y.Foo(); Y.Foo.ATTRS.baz = {value: 'baz'};
  17. Touching ATTRS Y.Foo = Y.Base.create('foo', Y.Base, [], {}, { ATTRS:

    { bar: {value: 'bar'} } }); var foo1 = new Y.Foo(); Y.Foo.ATTRS.baz = {value: 'baz'}; var foo2 = new Y.Foo();
  18. Touching ATTRS Y.Foo = Y.Base.create('foo', Y.Base, [], {}, { ATTRS:

    { bar: {value: 'bar'} } }); var foo1 = new Y.Foo(); Y.Foo.ATTRS.baz = {value: 'baz'}; var foo2 = new Y.Foo(); Y.log(foo2.get('baz')); // undefined
  19. Touching ATTRS Y.Foo = Y.Base.create('foo', Y.Base, [], {}, { ATTRS:

    { bar: {value: 'bar'} } }); var foo1 = new Y.Foo(); Y.Foo.ATTRS.baz = {value: 'baz'}; var foo2 = new Y.Foo(); Y.log(foo2.get('baz')); // undefined
  20. Touching ATTRS Y.Foo = Y.Base.create('foo', Y.Base, [], {}, { ATTRS:

    { bar: {value: 'bar'} } }); var foo1 = new Y.Foo(); Y.Foo.ATTRS.baz = {value: 'baz'}; var foo2 = new Y.Foo(); Y.log(foo2.get('baz')); // undefined
  21. Touching ATTRS Y.Foo = Y.Base.create('foo', Y.Base, [], {}, { ATTRS:

    { bar: {value: 'bar'} } }); var foo1 = new Y.Foo(); Y.Foo.modifyAttrs({ baz: {value: 'baz'} }); var foo2 = new Y.Foo(); Y.log(foo2.get('baz')); // undefined
  22. Touching ATTRS Y.Foo = Y.Base.create('foo', Y.Base, [], {}, { ATTRS:

    { bar: {value: 'bar'} } }); var foo1 = new Y.Foo(); Y.Foo.modifyAttrs({ baz: {value: 'baz'} }); var foo2 = new Y.Foo(); Y.log(foo2.get('baz')); // "baz"
  23. Three-Pronged 1) Attribute 2) Base 3) Custom Event

  24. 2 More Things… Go Faster

  25. 2 More Things… 1) Short-Circuit Event. 2) Filter ATTRS Statically.

  26. 0 20,000 40,000 60,000 80,000 71,255 13,696 ops/sec 3.8.1 3.10.0pr1++

    Y.Base
  27. 0 375,000 750,000 1,125,000 1,500,000 1,172,805 74,202 ops/sec 3.8.1 3.10.0pr1++

    Y.Base#set()
  28. Go Test 3.10.0pr1 Questions? @ericf