Opened 14 years ago

Closed 13 years ago

Last modified 12 years ago

#7072 closed defect (fixed)

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

Reported by: alex Owned by: alex
Priority: high Milestone: 1.3
Component: Query Version: 1.1.1
Keywords: Cc:
Blocked By: Blocking:


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 (8)

comment:1 Changed 14 years ago by alex

Milestone: 1.21.3
Priority: normalhigh
severity: normalminor
Status: newassigned

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.

comment:2 Changed 13 years ago by alex

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

comment:3 Changed 13 years ago by alex

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

comment:4 Changed 13 years ago by alex

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

comment:5 Changed 13 years 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

comment:6 Changed 13 years ago by alex

Resolution: fixed
Status: assignedclosed

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

comment:7 Changed 13 years ago by alex

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

comment:8 Changed 12 years ago by bill

Component: CoreQuery
Note: See TracTickets for help on using tickets.