Skip to content

Pretokenise JS functions included with generate_js #2461

Open
@gfwilliams

Description

Right now, in scripts/build_jswrapper.py we just include the JS files as-is

However we could pretokenise them and make them run faster as well as saving some space.

Only issue is our tools for pretokenising are either in JS or C, not Python (and I don't think we require Node.js to be installed for a compile currently), so I guess maybe we'd have to either:

  • Have a tool written in C that uses jslNewTokenisedStringFromLexer then build and run that from scripts/build_jswrapper.py
  • Pre-compile all the JS files we use (a bit like we pre-minify currently)

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions