SlideShare une entreprise Scribd logo
1  sur  39
Sizzle
What’s new in jQuery 1.8?

Timmy Willison
Performance
Wat? Fast?
Performance
Performance
Matching/filtering improved consistently by ~10%
  quickIs from event.js moved to Sizzle.filter
Performance
Matching/filtering improved consistently by ~10%
  quickIs from event.js moved to Sizzle.filter
Simple selectors (id only, tag only, class only) improved
by about 5% overall
Performance
Matching/filtering improved consistently by ~10%
  quickIs from event.js moved to Sizzle.filter
Simple selectors (id only, tag only, class only) improved
by about 5% overall
Element-rooted ID selections: 300% improvement
Performance
Matching/filtering improved consistently by ~10%
  quickIs from event.js moved to Sizzle.filter
Simple selectors (id only, tag only, class only) improved
by about 5% overall
Element-rooted ID selections: 300% improvement
Shorter codepaths to querySelectorAll and
matchesSelector
Filtering and matching
                1.7.2                1.8




*Based on http://jsperf.com/jquery-id-init/4 and
http://jsperf.com/jquery-id-init/6 (higher is better)
Filtering and matching
                      1.7.2                 1.8

100


75


50


25


 0
      event trigger           simple   complex    element-rooted ID


*Based on http://jsperf.com/jquery-id-init/4 and
http://jsperf.com/jquery-id-init/6 (higher is better)
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[^$*]=”” (Opera/IE9)
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
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!)
Combinators ( div ~ em + u > * )
Combinators ( div ~ em + u > * )

  When using multiple combinators in the same selector,
  some possible matches were being lost
Combinators ( div ~ em + u > * )

  When using multiple combinators in the same selector,
  some possible matches were being lost

Element-rooted querySelectorAll with divisions
Combinators ( div ~ em + u > * )

  When using multiple combinators in the same selector,
  some possible matches were being lost

Element-rooted querySelectorAll with divisions

  elem.querySelectorAll(“div, div > em”);
Combinators ( div ~ em + u > * )

  When using multiple combinators in the same selector,
  some possible matches were being lost

Element-rooted querySelectorAll with divisions

  elem.querySelectorAll(“div, div > em”);

Unicode validation (improved character encoding per spec)
Combinators ( div ~ em + u > * )

  When using multiple combinators in the same selector,
  some possible matches were being lost

Element-rooted querySelectorAll with divisions

  elem.querySelectorAll(“div, div > em”);

Unicode validation (improved character encoding per spec)

Several little edge cases
Coming Up
You are not prepared.
Coming Up
Coming Up
Sizzle may still see major changes before 1.8 release
Coming Up
Sizzle 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.
Coming Up
Sizzle 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)
Coming Up
Sizzle 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
Coming Up
Sizzle 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
Coming Up
Sizzle 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
There are still bugs!
Contributing
Contributing
Submit an issue at http://github.com/jquery/sizzle
Contributing
Submit an issue at http://github.com/jquery/sizzle
  Pick an issue and dig in
Contributing
Submit an issue at http://github.com/jquery/sizzle
  Pick an issue and dig in
Discussion in #jquery-dev, longer discussion in the
public Sizzle google group
Contributing
Submit an issue at http://github.com/jquery/sizzle
  Pick an issue and dig in
Discussion in #jquery-dev, longer discussion in the
public Sizzle google group
Same styleguide, development workflow as jQuery
Contributing
Submit an issue at http://github.com/jquery/sizzle
  Pick an issue and dig in
Discussion in #jquery-dev, longer discussion in the
public Sizzle google group
Same styleguide, development workflow as jQuery
  See jQuery’s readme (http://github.com/jquery/jquery)
Contributing (ask me)

 timmywil in #jquery or #jquery-dev
 @timmywil on the tweeters and the githubs
Up next
jQuery UI updates
Scott Gonzalez

Contenu connexe

Tendances

jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterpriseDave Artz
 
New Perspectives on Performance
New Perspectives on PerformanceNew Perspectives on Performance
New Perspectives on Performancemennovanslooten
 
Harness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkHarness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkBorisMoore
 
jQuery Conference San Diego 2014 - Web Performance
jQuery Conference San Diego 2014 - Web PerformancejQuery Conference San Diego 2014 - Web Performance
jQuery Conference San Diego 2014 - Web Performancedmethvin
 
jQuery Keynote - Fall 2010
jQuery Keynote - Fall 2010jQuery Keynote - Fall 2010
jQuery Keynote - Fall 2010jeresig
 
React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix Chen Lerner
 
Getting Started with Angular - Stormpath Webinar, January 2017
Getting Started with Angular - Stormpath Webinar, January 2017Getting Started with Angular - Stormpath Webinar, January 2017
Getting Started with Angular - Stormpath Webinar, January 2017Matt Raible
 
Mvvm knockout vs angular
Mvvm knockout vs angularMvvm knockout vs angular
Mvvm knockout vs angularBasarat Syed
 
Building a Simple Theme Framework
Building a Simple Theme FrameworkBuilding a Simple Theme Framework
Building a Simple Theme FrameworkJoe Casabona
 
Introduction to SPA with AngularJS
Introduction to SPA with AngularJSIntroduction to SPA with AngularJS
Introduction to SPA with AngularJSRiki Pribadi
 
Choosing the best JavaScript framework/library/toolkit
Choosing the best JavaScript framework/library/toolkitChoosing the best JavaScript framework/library/toolkit
Choosing the best JavaScript framework/library/toolkitHristo Chakarov
 
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and BackboneJavascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and BackboneDeepu S Nath
 
jQuery UI & Mobile - The Great Merger
jQuery UI & Mobile - The Great MergerjQuery UI & Mobile - The Great Merger
jQuery UI & Mobile - The Great Mergerscottgonzalez
 
jQuery Mobile Overview - Boston
jQuery Mobile  Overview -  BostonjQuery Mobile  Overview -  Boston
jQuery Mobile Overview - BostonTodd Parker
 
Avoiding Common Pitfalls in Ember.js
Avoiding Common Pitfalls in Ember.jsAvoiding Common Pitfalls in Ember.js
Avoiding Common Pitfalls in Ember.jsAlex Speller
 
Presentational jQuery
Presentational jQueryPresentational jQuery
Presentational jQueryDoug Neiner
 
Advanced AngularJS Concepts
Advanced AngularJS ConceptsAdvanced AngularJS Concepts
Advanced AngularJS ConceptsKyle Hodgson
 

Tendances (20)

jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] Enterprise
 
New Perspectives on Performance
New Perspectives on PerformanceNew Perspectives on Performance
New Perspectives on Performance
 
Harness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkHarness jQuery Templates and Data Link
Harness jQuery Templates and Data Link
 
Unit testing
Unit testingUnit testing
Unit testing
 
jQuery Conference San Diego 2014 - Web Performance
jQuery Conference San Diego 2014 - Web PerformancejQuery Conference San Diego 2014 - Web Performance
jQuery Conference San Diego 2014 - Web Performance
 
jQuery Keynote - Fall 2010
jQuery Keynote - Fall 2010jQuery Keynote - Fall 2010
jQuery Keynote - Fall 2010
 
React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix
 
Getting Started with Angular - Stormpath Webinar, January 2017
Getting Started with Angular - Stormpath Webinar, January 2017Getting Started with Angular - Stormpath Webinar, January 2017
Getting Started with Angular - Stormpath Webinar, January 2017
 
Mvvm knockout vs angular
Mvvm knockout vs angularMvvm knockout vs angular
Mvvm knockout vs angular
 
Building a Simple Theme Framework
Building a Simple Theme FrameworkBuilding a Simple Theme Framework
Building a Simple Theme Framework
 
Introduction to SPA with AngularJS
Introduction to SPA with AngularJSIntroduction to SPA with AngularJS
Introduction to SPA with AngularJS
 
Choosing the best JavaScript framework/library/toolkit
Choosing the best JavaScript framework/library/toolkitChoosing the best JavaScript framework/library/toolkit
Choosing the best JavaScript framework/library/toolkit
 
Spa with angular
Spa with angularSpa with angular
Spa with angular
 
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and BackboneJavascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
 
jQuery UI & Mobile - The Great Merger
jQuery UI & Mobile - The Great MergerjQuery UI & Mobile - The Great Merger
jQuery UI & Mobile - The Great Merger
 
jQuery Mobile Overview - Boston
jQuery Mobile  Overview -  BostonjQuery Mobile  Overview -  Boston
jQuery Mobile Overview - Boston
 
Avoiding Common Pitfalls in Ember.js
Avoiding Common Pitfalls in Ember.jsAvoiding Common Pitfalls in Ember.js
Avoiding Common Pitfalls in Ember.js
 
Presentational jQuery
Presentational jQueryPresentational jQuery
Presentational jQuery
 
Angular - Beginner
Angular - BeginnerAngular - Beginner
Angular - Beginner
 
Advanced AngularJS Concepts
Advanced AngularJS ConceptsAdvanced AngularJS Concepts
Advanced AngularJS Concepts
 

Similaire à Sizzle jQCon San Francisco 2012

J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Libraryrsnarayanan
 
jQuery Proven Performance Tips & Tricks
jQuery Proven Performance Tips & TricksjQuery Proven Performance Tips & Tricks
jQuery Proven Performance Tips & TricksAddy Osmani
 
Advanced #6 clean architecture
Advanced #6  clean architectureAdvanced #6  clean architecture
Advanced #6 clean architectureVitali Pekelis
 
Pragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptdavejohnson
 
Rspec Tips
Rspec TipsRspec Tips
Rspec Tipslionpeal
 
System settings
System settingsSystem settings
System settingshtyson
 
Declaring Server App Components in Pure Java
Declaring Server App Components in Pure JavaDeclaring Server App Components in Pure Java
Declaring Server App Components in Pure JavaAtlassian
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks TriviaCognizant
 
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The Future
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The FutureQA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The Future
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The FutureQAFest
 
Katalon Studio - GUI Overview
Katalon Studio - GUI OverviewKatalon Studio - GUI Overview
Katalon Studio - GUI OverviewKatalon Studio
 
BDD and Test Automation in Evalutionary Product Suite
BDD and Test Automation in Evalutionary Product SuiteBDD and Test Automation in Evalutionary Product Suite
BDD and Test Automation in Evalutionary Product SuiteLasantha Ranaweera
 
Top100summit 谷歌-scott-improve your automated web application testing
Top100summit  谷歌-scott-improve your automated web application testingTop100summit  谷歌-scott-improve your automated web application testing
Top100summit 谷歌-scott-improve your automated web application testingdrewz lin
 
React table tutorial use filter (part 2)
React table tutorial use filter (part 2)React table tutorial use filter (part 2)
React table tutorial use filter (part 2)Katy Slemon
 
Gilt Groupe's Selenium 2 Conversion Challenges
Gilt Groupe's Selenium 2 Conversion ChallengesGilt Groupe's Selenium 2 Conversion Challenges
Gilt Groupe's Selenium 2 Conversion ChallengesSauce Labs
 
The Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowThe Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowAll Things Open
 
A to Z about JQuery - Become Newbie to Expert Java Developer
A to Z about JQuery - Become Newbie to Expert Java DeveloperA to Z about JQuery - Become Newbie to Expert Java Developer
A to Z about JQuery - Become Newbie to Expert Java DeveloperManoj Bhuva
 
Ajax toolkit-framework
Ajax toolkit-frameworkAjax toolkit-framework
Ajax toolkit-frameworkWBUTTUTORIALS
 
Best Selenium Online Training
Best Selenium Online TrainingBest Selenium Online Training
Best Selenium Online TrainingSamatha Kamuni
 

Similaire à Sizzle jQCon San Francisco 2012 (20)

J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Library
 
jQuery Proven Performance Tips & Tricks
jQuery Proven Performance Tips & TricksjQuery Proven Performance Tips & Tricks
jQuery Proven Performance Tips & Tricks
 
Advanced #6 clean architecture
Advanced #6  clean architectureAdvanced #6  clean architecture
Advanced #6 clean architecture
 
Pragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScript
 
Rspec Tips
Rspec TipsRspec Tips
Rspec Tips
 
System settings
System settingsSystem settings
System settings
 
Declaring Server App Components in Pure Java
Declaring Server App Components in Pure JavaDeclaring Server App Components in Pure Java
Declaring Server App Components in Pure Java
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
 
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The Future
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The FutureQA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The Future
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The Future
 
Katalon Studio - GUI Overview
Katalon Studio - GUI OverviewKatalon Studio - GUI Overview
Katalon Studio - GUI Overview
 
BDD and Test Automation in Evalutionary Product Suite
BDD and Test Automation in Evalutionary Product SuiteBDD and Test Automation in Evalutionary Product Suite
BDD and Test Automation in Evalutionary Product Suite
 
Rails 101
Rails 101Rails 101
Rails 101
 
Top100summit 谷歌-scott-improve your automated web application testing
Top100summit  谷歌-scott-improve your automated web application testingTop100summit  谷歌-scott-improve your automated web application testing
Top100summit 谷歌-scott-improve your automated web application testing
 
React table tutorial use filter (part 2)
React table tutorial use filter (part 2)React table tutorial use filter (part 2)
React table tutorial use filter (part 2)
 
Browser-level testing
Browser-level testingBrowser-level testing
Browser-level testing
 
Gilt Groupe's Selenium 2 Conversion Challenges
Gilt Groupe's Selenium 2 Conversion ChallengesGilt Groupe's Selenium 2 Conversion Challenges
Gilt Groupe's Selenium 2 Conversion Challenges
 
The Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowThe Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To Know
 
A to Z about JQuery - Become Newbie to Expert Java Developer
A to Z about JQuery - Become Newbie to Expert Java DeveloperA to Z about JQuery - Become Newbie to Expert Java Developer
A to Z about JQuery - Become Newbie to Expert Java Developer
 
Ajax toolkit-framework
Ajax toolkit-frameworkAjax toolkit-framework
Ajax toolkit-framework
 
Best Selenium Online Training
Best Selenium Online TrainingBest Selenium Online Training
Best Selenium Online Training
 

Dernier

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Dernier (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

Sizzle jQCon San Francisco 2012

  • 1. Sizzle What’s new in jQuery 1.8? Timmy Willison
  • 4. Performance Matching/filtering improved consistently by ~10% quickIs from event.js moved to Sizzle.filter
  • 5. Performance Matching/filtering improved consistently by ~10% quickIs from event.js moved to Sizzle.filter Simple selectors (id only, tag only, class only) improved by about 5% overall
  • 6. Performance Matching/filtering improved consistently by ~10% quickIs from event.js moved to Sizzle.filter Simple selectors (id only, tag only, class only) improved by about 5% overall Element-rooted ID selections: 300% improvement
  • 7. Performance Matching/filtering improved consistently by ~10% quickIs from event.js moved to Sizzle.filter Simple selectors (id only, tag only, class only) improved by about 5% overall Element-rooted ID selections: 300% improvement Shorter codepaths to querySelectorAll and matchesSelector
  • 8. Filtering and matching 1.7.2 1.8 *Based on http://jsperf.com/jquery-id-init/4 and http://jsperf.com/jquery-id-init/6 (higher is better)
  • 9. Filtering and matching 1.7.2 1.8 100 75 50 25 0 event trigger simple complex element-rooted ID *Based on http://jsperf.com/jquery-id-init/4 and http://jsperf.com/jquery-id-init/6 (higher is better)
  • 10. Sizzle(“div.&*( ~ timmy:checkers [dave^=‘core’]”).length === 0
  • 11. Ok, there were bugs.
  • 12. Ok, there were bugs. Improved QSA/matchesSelector bug-detection
  • 13. Ok, there were bugs. Improved QSA/matchesSelector bug-detection bypasses in certain browsers on certain selectors
  • 14. Ok, there were bugs. Improved QSA/matchesSelector bug-detection bypasses in certain browsers on certain selectors class[^$*]=”” (Opera/IE9)
  • 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. 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.
  • 18. Combinators ( div ~ em + u > * )
  • 19. Combinators ( div ~ em + u > * ) When using multiple combinators in the same selector, some possible matches were being lost
  • 20. Combinators ( div ~ em + u > * ) When using multiple combinators in the same selector, some possible matches were being lost Element-rooted querySelectorAll with divisions
  • 21. Combinators ( div ~ em + u > * ) When using multiple combinators in the same selector, some possible matches were being lost Element-rooted querySelectorAll with divisions elem.querySelectorAll(“div, div > em”);
  • 22. Combinators ( div ~ em + u > * ) When using multiple combinators in the same selector, some possible matches were being lost Element-rooted querySelectorAll with divisions elem.querySelectorAll(“div, div > em”); Unicode validation (improved character encoding per spec)
  • 23. Combinators ( div ~ em + u > * ) When using multiple combinators in the same selector, some possible matches were being lost Element-rooted querySelectorAll with divisions elem.querySelectorAll(“div, div > em”); Unicode validation (improved character encoding per spec) Several little edge cases
  • 24. Coming Up You are not prepared.
  • 26. Coming Up Sizzle may still see major changes before 1.8 release
  • 27. Coming Up Sizzle 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.
  • 28. Coming Up Sizzle 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)
  • 29. Coming Up Sizzle 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
  • 30. Coming Up Sizzle 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
  • 31. Coming Up Sizzle 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 There are still bugs!
  • 33. Contributing Submit an issue at http://github.com/jquery/sizzle
  • 34. Contributing Submit an issue at http://github.com/jquery/sizzle Pick an issue and dig in
  • 35. Contributing Submit an issue at http://github.com/jquery/sizzle Pick an issue and dig in Discussion in #jquery-dev, longer discussion in the public Sizzle google group
  • 36. Contributing Submit an issue at http://github.com/jquery/sizzle Pick an issue and dig in Discussion in #jquery-dev, longer discussion in the public Sizzle google group Same styleguide, development workflow as jQuery
  • 37. Contributing Submit an issue at http://github.com/jquery/sizzle Pick an issue and dig in Discussion in #jquery-dev, longer discussion in the public Sizzle google group Same styleguide, development workflow as jQuery See jQuery’s readme (http://github.com/jquery/jquery)
  • 38. Contributing (ask me) timmywil in #jquery or #jquery-dev @timmywil on the tweeters and the githubs
  • 39. Up next jQuery UI updates Scott Gonzalez

Notes de l'éditeur

  1. Welcome, so excited about what we have in store for Sizzle in jQuery 1.8.\nFirst, let’s talk about performance\n
  2. Many things stayed the same\n
  3. 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
  4. 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
  5. 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
  6. 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
  7. - event delegation\n- id, tag, class\n- jQuery(something).find(ID)\n
  8. - 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. And I’m here to tell you, you are not prepared.\n
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. - 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
  28. - 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
  29. - 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
  30. - 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
  31. - 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
  32. \n
  33. \n