GoogleChromeLabs / estimator.dev

🧮 Calculate the size and performance impact of switching to modern JavaScript syntax.
https://estimator.dev
Apache License 2.0
665 stars 23 forks source link

Unable to process large javascript files #22

Open trev33b opened 3 years ago

trev33b commented 3 years ago

I had to run through a couple of hurdles to try out your tool. First, the application I wanted to test is only available via localhost and I couldn't run it using HTTPS.

So, I git cloned your code and hacked the client to allow me to enter an HTTP address and then ran the client/server locally using the instructions in the README.md.

The next hurdle I ran into was a size limitation, which appears to cap out at 2MB. My JavaScript file is about 6MB for the largest file, plus a couple of other smaller files.

I tried modifying the server code, but I wasn't able to figure out how to run that server code locally. I tried changing the both of the "Refusing" messages within handlers.js and the MAX_SIZE variable, but doing that seemed to have no effect. I suspect the server files first need to be deployed to firebase and of course I can't do that.

Is there anyway to run server modifications locally? (I'm not a firebase expert). Alternatively, would you be able to increase the MAX_SIZE limitation and deploy that? I'd understand if that's a non-starter if that costs you $$$. Just trying to figure out how to run this because I'm very curious about a large app that I've developed.

kevinfarrugia commented 3 years ago

Is this the error you are seeing:

Refusing to process more than 2MB of JavaScript.

Note that you need to re-run npm run build and firebase emulators:start after doing any code changes. I think I was able to change the MAX_SIZE variable inside server/handlers.js