Open Bug 1885395 Opened 7 months ago Updated 7 months ago

Optimizing webidl lexing step

Categories

(Core :: DOM: Bindings (WebIDL), task)

task

Tracking

()

People

(Reporter: sergesanspaille, Assigned: sergesanspaille)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It takes more than one second just to do the lexing part, there's probably some optimization opportunities there

  • use non capturing parenthesis for the regular expression
  • rely on int(val, base=0) to detect base instead of doing it by hand
  • use the lex literals magic entry to speedup token processing (and
    for easier grammar maintenance)

This saves roughly 100ms during lexing, which is 10% of its actual time.

Depends on D204670

Attachment #9391313 - Attachment description: Bug 1885395 - speedup webidl lexer r=ahochheiden → Bug 1885395 - speedup webidl lexer r=ahochheiden!
Component: General → DOM: Bindings (WebIDL)
Product: Firefox Build System → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: