Opened 13 years ago

Closed 13 years ago

Last modified 13 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

Description

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:
https://bitbucket.org/ned/jslex/issue/1/jslex-is-slooow-on-big-javascript-files

This applies that same patch to the Django code.

Attachments (1)

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

Download all attachments as: .zip

Change History (3)

by Ned Batchelder, 13 years ago

Attachment: jslex-speedup.patch added

The patch!

comment:1 by Jannis Leidel, 13 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Aymeric Augustin, 13 years ago

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