Skip to content

Pretokenise JS functions included with generate_js #2461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gfwilliams opened this issue Jan 30, 2024 · 1 comment
Closed

Pretokenise JS functions included with generate_js #2461

gfwilliams opened this issue Jan 30, 2024 · 1 comment

Comments

@gfwilliams
Copy link
Member

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)
@gfwilliams
Copy link
Member Author

We now do this - .min.js files are stored pretokenised

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant