SizzleWhat’s new in jQuery 1.8?Timmy Willison
PerformanceWat? Fast?
Performance
PerformanceMatching/filtering improved consistently by ~10%  quickIs from event.js moved to Sizzle.filter
PerformanceMatching/filtering improved consistently by ~10%  quickIs from event.js moved to Sizzle.filterSimple selectors (i...
PerformanceMatching/filtering improved consistently by ~10%  quickIs from event.js moved to Sizzle.filterSimple selectors (i...
PerformanceMatching/filtering improved consistently by ~10%  quickIs from event.js moved to Sizzle.filterSimple selectors (i...
Filtering and matching                1.7.2                1.8*Based on http://jsperf.com/jquery-id-init/4 andhttp://jsper...
Filtering and matching                      1.7.2                 1.8100755025 0      event trigger           simple   com...
Sizzle(“div.&*( ~ timmy:checkers [dave^=‘core’]”).length === 0
Ok, there were bugs.
Ok, there were bugs.Improved QSA/matchesSelector bug-detection
Ok, there were bugs.Improved QSA/matchesSelector bug-detection  bypasses in certain browsers on certain selectors
Ok, there were bugs.Improved QSA/matchesSelector bug-detection  bypasses in certain browsers on certain selectors    class...
Ok, there were bugs.Improved QSA/matchesSelector bug-detection  bypasses in certain browsers on certain selectors    class...
Ok, there were bugs.Improved QSA/matchesSelector bug-detection  bypasses in certain browsers on certain selectors    class...
Combinators ( div ~ em + u > * )
Combinators ( div ~ em + u > * )  When using multiple combinators in the same selector,  some possible matches were being ...
Combinators ( div ~ em + u > * )  When using multiple combinators in the same selector,  some possible matches were being ...
Combinators ( div ~ em + u > * )  When using multiple combinators in the same selector,  some possible matches were being ...
Combinators ( div ~ em + u > * )  When using multiple combinators in the same selector,  some possible matches were being ...
Combinators ( div ~ em + u > * )  When using multiple combinators in the same selector,  some possible matches were being ...
Coming UpYou are not prepared.
Coming Up
Coming UpSizzle may still see major changes before 1.8 release
Coming UpSizzle may still see major changes before 1.8 release  Explore implementing a compiler to convert a  selector int...
Coming UpSizzle may still see major changes before 1.8 release  Explore implementing a compiler to convert a  selector int...
Coming UpSizzle may still see major changes before 1.8 release  Explore implementing a compiler to convert a  selector int...
Coming UpSizzle may still see major changes before 1.8 release  Explore implementing a compiler to convert a  selector int...
Coming UpSizzle may still see major changes before 1.8 release  Explore implementing a compiler to convert a  selector int...
Contributing
ContributingSubmit an issue at http://github.com/jquery/sizzle
ContributingSubmit an issue at http://github.com/jquery/sizzle  Pick an issue and dig in
ContributingSubmit an issue at http://github.com/jquery/sizzle  Pick an issue and dig inDiscussion in #jquery-dev, longer ...
ContributingSubmit an issue at http://github.com/jquery/sizzle  Pick an issue and dig inDiscussion in #jquery-dev, longer ...
ContributingSubmit an issue at http://github.com/jquery/sizzle  Pick an issue and dig inDiscussion in #jquery-dev, longer ...
Contributing (ask me) timmywil in #jquery or #jquery-dev @timmywil on the tweeters and the githubs
Up nextjQuery UI updatesScott Gonzalez
Sizzle jQCon San Francisco 2012
Upcoming SlideShare
Loading in...5
×

Sizzle jQCon San Francisco 2012

4,137

Published on

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,137
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
43
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • Welcome, so excited about what we have in store for Sizzle in jQuery 1.8.\nFirst, let’s talk about performance\n
  • Many things stayed the same\n
  • To sum up\n- Based on all of the perf tests I’ve done so far, we have excellent codepaths to QSA and matchesSelector\n- So, we’ve covered some performance stuff. Now the next question is, what did we fix?\n
  • To sum up\n- Based on all of the perf tests I’ve done so far, we have excellent codepaths to QSA and matchesSelector\n- So, we’ve covered some performance stuff. Now the next question is, what did we fix?\n
  • To sum up\n- Based on all of the perf tests I’ve done so far, we have excellent codepaths to QSA and matchesSelector\n- So, we’ve covered some performance stuff. Now the next question is, what did we fix?\n
  • To sum up\n- Based on all of the perf tests I’ve done so far, we have excellent codepaths to QSA and matchesSelector\n- So, we’ve covered some performance stuff. Now the next question is, what did we fix?\n
  • - event delegation\n- id, tag, class\n- jQuery(something).find(ID)\n
  • - actually that selector would work if the special characters were escaped and :checkers was a custom pseudo.\n- OK, but there were actually bugs\n
  • Every browser has bugs in querySelectorAll, even webkit.\n- If you know what I did in the last version of jQuery, you’ll know about my long standing relationship with attributes. IE8’s QSA doesn’t handle boolean attributes very well.\n
  • Every browser has bugs in querySelectorAll, even webkit.\n- If you know what I did in the last version of jQuery, you’ll know about my long standing relationship with attributes. IE8’s QSA doesn’t handle boolean attributes very well.\n
  • Every browser has bugs in querySelectorAll, even webkit.\n- If you know what I did in the last version of jQuery, you’ll know about my long standing relationship with attributes. IE8’s QSA doesn’t handle boolean attributes very well.\n
  • Every browser has bugs in querySelectorAll, even webkit.\n- If you know what I did in the last version of jQuery, you’ll know about my long standing relationship with attributes. IE8’s QSA doesn’t handle boolean attributes very well.\n
  • Every browser has bugs in querySelectorAll, even webkit.\n- If you know what I did in the last version of jQuery, you’ll know about my long standing relationship with attributes. IE8’s QSA doesn’t handle boolean attributes very well.\n
  • The only acceptable division in the selectors spec is comma, which made this easy to fix.\nSo you might be wondering what’s next.\n
  • The only acceptable division in the selectors spec is comma, which made this easy to fix.\nSo you might be wondering what’s next.\n
  • The only acceptable division in the selectors spec is comma, which made this easy to fix.\nSo you might be wondering what’s next.\n
  • The only acceptable division in the selectors spec is comma, which made this easy to fix.\nSo you might be wondering what’s next.\n
  • The only acceptable division in the selectors spec is comma, which made this easy to fix.\nSo you might be wondering what’s next.\n
  • The only acceptable division in the selectors spec is comma, which made this easy to fix.\nSo you might be wondering what’s next.\n
  • And I’m here to tell you, you are not prepared.\n
  • Everything I’ve told you about Sizzle today might change before 1.8 is released. It’s true I rewrote Sizzle. I might just rewrite it again.\n
  • Everything I’ve told you about Sizzle today might change before 1.8 is released. It’s true I rewrote Sizzle. I might just rewrite it again.\n
  • Everything I’ve told you about Sizzle today might change before 1.8 is released. It’s true I rewrote Sizzle. I might just rewrite it again.\n
  • Everything I’ve told you about Sizzle today might change before 1.8 is released. It’s true I rewrote Sizzle. I might just rewrite it again.\n
  • Everything I’ve told you about Sizzle today might change before 1.8 is released. It’s true I rewrote Sizzle. I might just rewrite it again.\n
  • Everything I’ve told you about Sizzle today might change before 1.8 is released. It’s true I rewrote Sizzle. I might just rewrite it again.\n
  • - maybe even with a pull request\n- the issues on the jQuery bugs site will be migrated\n- stale google group, needs more life\n\n
  • - maybe even with a pull request\n- the issues on the jQuery bugs site will be migrated\n- stale google group, needs more life\n\n
  • - maybe even with a pull request\n- the issues on the jQuery bugs site will be migrated\n- stale google group, needs more life\n\n
  • - maybe even with a pull request\n- the issues on the jQuery bugs site will be migrated\n- stale google group, needs more life\n\n
  • - maybe even with a pull request\n- the issues on the jQuery bugs site will be migrated\n- stale google group, needs more life\n\n
  • \n
  • \n
  • Sizzle jQCon San Francisco 2012

    1. 1. SizzleWhat’s new in jQuery 1.8?Timmy Willison
    2. 2. PerformanceWat? Fast?
    3. 3. Performance
    4. 4. PerformanceMatching/filtering improved consistently by ~10% quickIs from event.js moved to Sizzle.filter
    5. 5. PerformanceMatching/filtering improved consistently by ~10% quickIs from event.js moved to Sizzle.filterSimple selectors (id only, tag only, class only) improvedby about 5% overall
    6. 6. PerformanceMatching/filtering improved consistently by ~10% quickIs from event.js moved to Sizzle.filterSimple selectors (id only, tag only, class only) improvedby about 5% overallElement-rooted ID selections: 300% improvement
    7. 7. PerformanceMatching/filtering improved consistently by ~10% quickIs from event.js moved to Sizzle.filterSimple selectors (id only, tag only, class only) improvedby about 5% overallElement-rooted ID selections: 300% improvementShorter codepaths to querySelectorAll andmatchesSelector
    8. 8. Filtering and matching 1.7.2 1.8*Based on http://jsperf.com/jquery-id-init/4 andhttp://jsperf.com/jquery-id-init/6 (higher is better)
    9. 9. Filtering and matching 1.7.2 1.8100755025 0 event trigger simple complex element-rooted ID*Based on http://jsperf.com/jquery-id-init/4 andhttp://jsperf.com/jquery-id-init/6 (higher is better)
    10. 10. Sizzle(“div.&*( ~ timmy:checkers [dave^=‘core’]”).length === 0
    11. 11. Ok, there were bugs.
    12. 12. Ok, there were bugs.Improved QSA/matchesSelector bug-detection
    13. 13. Ok, there were bugs.Improved QSA/matchesSelector bug-detection bypasses in certain browsers on certain selectors
    14. 14. Ok, there were bugs.Improved QSA/matchesSelector bug-detection bypasses in certain browsers on certain selectors class[^$*]=”” (Opera/IE9)
    15. 15. Ok, there were bugs.Improved QSA/matchesSelector bug-detection bypasses in certain browsers on certain selectors class[^$*]=”” (Opera/IE9) :checked won’t return selected options as per the spec in versions of Chrome/Safari/Opera
    16. 16. Ok, there were bugs.Improved QSA/matchesSelector bug-detection bypasses in certain browsers on certain selectors class[^$*]=”” (Opera/IE9) :checked won’t return selected options as per the spec in versions of Chrome/Safari/Opera attroperties IE8 (attributes are everywhere!)
    17. 17. Combinators ( div ~ em + u > * )
    18. 18. Combinators ( div ~ em + u > * ) When using multiple combinators in the same selector, some possible matches were being lost
    19. 19. Combinators ( div ~ em + u > * ) When using multiple combinators in the same selector, some possible matches were being lostElement-rooted querySelectorAll with divisions
    20. 20. Combinators ( div ~ em + u > * ) When using multiple combinators in the same selector, some possible matches were being lostElement-rooted querySelectorAll with divisions elem.querySelectorAll(“div, div > em”);
    21. 21. Combinators ( div ~ em + u > * ) When using multiple combinators in the same selector, some possible matches were being lostElement-rooted querySelectorAll with divisions elem.querySelectorAll(“div, div > em”);Unicode validation (improved character encoding per spec)
    22. 22. Combinators ( div ~ em + u > * ) When using multiple combinators in the same selector, some possible matches were being lostElement-rooted querySelectorAll with divisions elem.querySelectorAll(“div, div > em”);Unicode validation (improved character encoding per spec)Several little edge cases
    23. 23. Coming UpYou are not prepared.
    24. 24. Coming Up
    25. 25. Coming UpSizzle may still see major changes before 1.8 release
    26. 26. Coming UpSizzle may still see major changes before 1.8 release Explore implementing a compiler to convert a selector into a function in order to avoid ever looping over elements more than once.
    27. 27. Coming UpSizzle may still see major changes before 1.8 release Explore implementing a compiler to convert a selector into a function in order to avoid ever looping over elements more than once.More css3 selectors (after 1.8)
    28. 28. Coming UpSizzle may still see major changes before 1.8 release Explore implementing a compiler to convert a selector into a function in order to avoid ever looping over elements more than once.More css3 selectors (after 1.8)Provide even more selector validation
    29. 29. Coming UpSizzle may still see major changes before 1.8 release Explore implementing a compiler to convert a selector into a function in order to avoid ever looping over elements more than once.More css3 selectors (after 1.8)Provide even more selector validation e.g. [attr=”value”] - identifier vs. string
    30. 30. Coming UpSizzle may still see major changes before 1.8 release Explore implementing a compiler to convert a selector into a function in order to avoid ever looping over elements more than once.More css3 selectors (after 1.8)Provide even more selector validation e.g. [attr=”value”] - identifier vs. stringThere are still bugs!
    31. 31. Contributing
    32. 32. ContributingSubmit an issue at http://github.com/jquery/sizzle
    33. 33. ContributingSubmit an issue at http://github.com/jquery/sizzle Pick an issue and dig in
    34. 34. ContributingSubmit an issue at http://github.com/jquery/sizzle Pick an issue and dig inDiscussion in #jquery-dev, longer discussion in thepublic Sizzle google group
    35. 35. ContributingSubmit an issue at http://github.com/jquery/sizzle Pick an issue and dig inDiscussion in #jquery-dev, longer discussion in thepublic Sizzle google groupSame styleguide, development workflow as jQuery
    36. 36. ContributingSubmit an issue at http://github.com/jquery/sizzle Pick an issue and dig inDiscussion in #jquery-dev, longer discussion in thepublic Sizzle google groupSame styleguide, development workflow as jQuery See jQuery’s readme (http://github.com/jquery/jquery)
    37. 37. Contributing (ask me) timmywil in #jquery or #jquery-dev @timmywil on the tweeters and the githubs
    38. 38. Up nextjQuery UI updatesScott Gonzalez
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×