Ticket #7072 (closed defect: fixed)

Opened 12 months ago

Last modified 5 months ago

dojo.query() is oddly slow in "~" child selectors on IE

Reported by: alex Owned by: alex
Priority: high Milestone: 1.3
Component: Core Version: 1.1.1
Severity: minor Keywords:
Cc:

Description

on slickspeed, Dojo 1.1's query() has a huge outlier in terms of overall performance on the "~" adjacent child selector. This seems to be due to a toLowerCase() string call which gets run very often in the tag name matching filter.

Change History

Changed 12 months ago by alex

  • priority changed from normal to high
  • status changed from new to assigned
  • severity changed from normal to minor
  • milestone changed from 1.2 to 1.3

I've tracked this down to selection of sibling selectors happening on the token on the left-hand side of the expression. So if we have an expression of ".thinger div ~ span", the engine will search for all items with a class of "thinger" and then will look for children which are divs. This leads to serious inefficiency since we're not "failing early, since we actually care to look at descendants which are *spans*, which are then modified by the "and are preceeded by a div as siblings" rule. A relatively large change to the tokenizer will be required to change the performance profile on this query, so given its relative infrequent use, I'm going to punt this to 1.3. We're still faster than all comers on queries that actually see day-to-day use, but I strongly agree that we should get this fixed soon.

Changed 6 months ago by alex

(In [16218]) some require() and NodeList? doc changes that happened while I was hacking on steak. Refs #7072, #4425

Changed 6 months ago by alex

(In [16226]) steak -> acme. Need a better name. Refs #7072. Refs #4425. !strict

Changed 6 months ago by alex

(In [16228]) updating for the acme engine. Refs #7072. Refs #4425

Changed 6 months ago by alex

(In [16232]) some size reductions. Also (finally) enables the QSA branch. Not sure how I missed that.

Refs #7072. Refs #4425. !strict

Changed 6 months ago by alex

  • status changed from assigned to closed
  • resolution set to fixed

the new query system has landed. Marking this as fixed.

Changed 5 months ago by alex

(In [16532]) removes cruft, updates code comments, and makes some operations slightly quicker. Refs #7072 !strict

Note: See TracTickets for help on using tickets.