Closed Bug 928237 Opened 11 years ago Closed 11 years ago

clean up slowparse by refactoring calls to parser.domBuilder.currentNode

Categories

(Webmaker Graveyard :: Thimble, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: michiel, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

if we're pulling data out of parser.domBuilder.currentNode more than once, we should cache that as:

var currentNode = parser.domBuilder.currentNode;

and then do

return {
  openTag: this._combine({
    name: currentNode.nodeName.toLowerCase()
  }, currentNode.parseInfo.openTag),
...

We're doing a lot of duplicated data pulling in a lot of places atm.
I will take it.
Flags: needinfo?(pomax)
Attachment #829918 - Flags: review?(pomax)
(In reply to xdchen from comment #2)
> Created attachment 829918 [details] [review]
> https://github.com/mozilla/slowparse/pull/59

this one is in
Flags: needinfo?(pomax)
Attachment #829918 - Attachment is obsolete: true
Attachment #829918 - Flags: review?(pomax)
Attachment #830817 - Flags: review?(pomax)
Attachment #830817 - Flags: review?(pomax) → review+
landed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: