You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
will take 10+ secs to trace using node v16.15.0 . Each additional .concat() will double the time required. Which means the algorithm used is Big O (2^n).
time node out/cli.js print input.js
FILELIST:
package.json
input.js
real 0m11.048s
user 0m11.084s
sys 0m0.091s
I tried to find a solution but do not understand the code well enough to know what to change. This bug makes this project unusable for our project which uses many template literals. Babel/preset-env compiles these literals to .concat() chains. See https://babeljs.io/docs/en/babel-plugin-transform-template-literals for more. There's hundreds chained together in the large final file which you can see on NPM but the above is enough to reproduce the problem. This package in included in a seperate NEXT js project which uses @vercel/nft as part of it's build process but that build is hanging because of all the concat() it's trying to walk through.
Please make walking concat() more efficient someway.
The text was updated successfully, but these errors were encountered:
superdav42
added a commit
to superdav42/proskomma-js
that referenced
this issue
Oct 11, 2022
As a result of #198
Any js file with many chained concat() calls will take an eternity to trace.
A file with
will take 10+ secs to trace using node v16.15.0 . Each additional .concat() will double the time required. Which means the algorithm used is Big O (2^n).
time node out/cli.js print input.js FILELIST: package.json input.js real 0m11.048s user 0m11.084s sys 0m0.091s
I tried to find a solution but do not understand the code well enough to know what to change. This bug makes this project unusable for our project which uses many template literals. Babel/preset-env compiles these literals to .concat() chains. See https://babeljs.io/docs/en/babel-plugin-transform-template-literals for more. There's hundreds chained together in the large final file which you can see on NPM but the above is enough to reproduce the problem. This package in included in a seperate NEXT js project which uses @vercel/nft as part of it's build process but that build is hanging because of all the concat() it's trying to walk through.
Please make walking concat() more efficient someway.
The text was updated successfully, but these errors were encountered: