KEMBAR78
Change terser configuration to workaround threejs/terser incompatibility. by bmd3k · Pull Request #5495 · tensorflow/tensorboard · GitHub
Skip to content

Conversation

@bmd3k
Copy link
Contributor

@bmd3k bmd3k commented Jan 11, 2022

Users have reported problems loading TensorBoard in Safari: #5489

Thanks to @severo and @bileschi we were able to identify the problem to an incompatibility between threejs (which we use for WebGL rendering) and terser (which we use for minimizing/optimizing our code).

Angular encountered this problem last year and worked around it by changing their terser config by reducing number of passes from 3 to 2:

In our case I have to reduce the number of terser passes from 3 to 1. For some reason reducing to 2 does not solve the problem.

This change surprisingly appears to reduce binary size. Before this change the size of index.js is 7672844 bytes. After this change the size of index.js is 7670992 bytes -- reducing binary size by 1852 bytes.

incompatibility.

It fixes a problem with loading tensorboard in Safari.
Copy link
Contributor

@JamesHollyer JamesHollyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are saying that compressing the binary more times actually increases the size of the binary? Hmmm seems like a Terser bug to me. Might even be worth reporting it to them?

This change seems like a win, win, win. LGTM

@bmd3k bmd3k merged commit fef5345 into tensorflow:master Jan 13, 2022
bmd3k added a commit to bmd3k/tensorboard that referenced this pull request Jan 19, 2022
…mpatibility (tensorflow#5495)

Users have reported problems loading TensorBoard in Safari: tensorflow#5489

Thanks to @severo and @bileschi we were able to identify the problem to an incompatibility between threejs (which we use for WebGL rendering) and terser (which we use for minimizing/optimizing our code). 

Angular encountered this problem last year and worked around it by changing their terser config by reducing number of passes from 3 to 2: 
* angular/angular-cli#21107
* angular/angular-cli@2c2b499

In our case I have to reduce the number of terser passes from 3 to 1. For some reason reducing to 2 does not solve the problem.

This change surprisingly appears to reduce binary size. Before this change the size of index.js is 7672844 bytes. After this change the size of index.js is 7670992 bytes -- reducing binary size by 1852 bytes.
bmd3k added a commit that referenced this pull request Jan 20, 2022
…mpatibility (#5495)

Users have reported problems loading TensorBoard in Safari: #5489

Thanks to @severo and @bileschi we were able to identify the problem to an incompatibility between threejs (which we use for WebGL rendering) and terser (which we use for minimizing/optimizing our code). 

Angular encountered this problem last year and worked around it by changing their terser config by reducing number of passes from 3 to 2: 
* angular/angular-cli#21107
* angular/angular-cli@2c2b499

In our case I have to reduce the number of terser passes from 3 to 1. For some reason reducing to 2 does not solve the problem.

This change surprisingly appears to reduce binary size. Before this change the size of index.js is 7672844 bytes. After this change the size of index.js is 7670992 bytes -- reducing binary size by 1852 bytes.
@bmd3k bmd3k deleted the safari-fix-terser branch April 20, 2022 15:13
yatbear pushed a commit to yatbear/tensorboard that referenced this pull request Mar 27, 2023
…mpatibility (tensorflow#5495)

Users have reported problems loading TensorBoard in Safari: tensorflow#5489

Thanks to @severo and @bileschi we were able to identify the problem to an incompatibility between threejs (which we use for WebGL rendering) and terser (which we use for minimizing/optimizing our code). 

Angular encountered this problem last year and worked around it by changing their terser config by reducing number of passes from 3 to 2: 
* angular/angular-cli#21107
* angular/angular-cli@2c2b499

In our case I have to reduce the number of terser passes from 3 to 1. For some reason reducing to 2 does not solve the problem.

This change surprisingly appears to reduce binary size. Before this change the size of index.js is 7672844 bytes. After this change the size of index.js is 7670992 bytes -- reducing binary size by 1852 bytes.
dna2github pushed a commit to dna2fork/tensorboard that referenced this pull request May 1, 2023
…mpatibility (tensorflow#5495)

Users have reported problems loading TensorBoard in Safari: tensorflow#5489

Thanks to @severo and @bileschi we were able to identify the problem to an incompatibility between threejs (which we use for WebGL rendering) and terser (which we use for minimizing/optimizing our code). 

Angular encountered this problem last year and worked around it by changing their terser config by reducing number of passes from 3 to 2: 
* angular/angular-cli#21107
* angular/angular-cli@2c2b499

In our case I have to reduce the number of terser passes from 3 to 1. For some reason reducing to 2 does not solve the problem.

This change surprisingly appears to reduce binary size. Before this change the size of index.js is 7672844 bytes. After this change the size of index.js is 7670992 bytes -- reducing binary size by 1852 bytes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants