Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#16971 closed Cleanup/optimization (fixed)

Speed-up for jslex used during makemessages for Javascript files.

Reported by: Ned Batchelder Owned by: nobody
Component: Internationalization Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The JsLex lexer introduced in [16333] has a fairly slow inner loop, because of the string truncation used as tokens are consumed.

Antti Haapala (antti@…) contributed a much tighter implementation of the inner loop:

This applies that same patch to the Django code.

Attachments (1)

jslex-speedup.patch (1.7 KB) - added by Ned Batchelder 7 years ago.
The patch!

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Ned Batchelder

Attachment: jslex-speedup.patch added

The patch!

comment:1 Changed 7 years ago by Jannis Leidel

Triage Stage: UnreviewedReady for checkin

comment:2 Changed 7 years ago by Aymeric Augustin

Resolution: fixed
Status: newclosed

In [16924]:

Fixed #16971 - Made the parsing of javascript files by 'makemessages' much faster. Thanks Antti Haapala for the implementation and Ned Batchelder for the patch.

Note: See TracTickets for help on using tickets.
Back to Top