Skip to content
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

Minify WebGL shaders #13335

Open
ianthomas23 opened this issue Aug 16, 2023 · 0 comments · May be fixed by #13706
Open

Minify WebGL shaders #13335

ianthomas23 opened this issue Aug 16, 2023 · 0 comments · May be fixed by #13706

Comments

@ianthomas23
Copy link
Member

Currently the WebGL shaders (*.vert and *.frag files) are not minified when they are bundled into the minified bundles such as bokeh-gl.min.js. They should be minified to reduce bundle and download size.

Things to do:

  1. Remove comments
  2. Remove unnecessary whitespace
  3. Rename temporary variables to have shorter names (optional)

Items 1 and 2 could be done by someone without any GLSL knowledge. Item 3 needs some knowledge of what are and aren't GLSL keywords which is why I have labelled it optional.

This could be done using a third-party JavaScript library, or we could roll our own alongside similar code in the bokehjs/make/tasks directory.

@ianthomas23 ianthomas23 added this to the 3.x milestone Aug 16, 2023
@ianthomas23 ianthomas23 linked a pull request Feb 20, 2024 that will close this issue
@mattpap mattpap modified the milestones: 3.x, 3.4 Feb 20, 2024
@mattpap mattpap modified the milestones: 3.4, 3.4.1 Feb 28, 2024
@mattpap mattpap modified the milestones: 3.4.1, 3.5 Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants