${this.supervisor.localize("store.no_results_found","repository",t.name)}
Closed toxic0berliner closed 1 year ago
Depends where the file gets truncated, can vary a bit
Please paste it anyway.
I would assume you're talking about the supervisor entrypoint, but it's not clear without the full error and URI.
Took ma a while, it's this one :
${this.supervisor.localize("store.no_results_found","repository",t.name)}
${this.supervisor.localize("backup.selected",{number:this._selectedBackups.length})}
Had to cut it even more as comment length in github is also restrained. Took it from the full file so you can also see the real end of the file with the sourcemapping.
Running the latest on HAOS : Home Assistant 2023.4.4 Supervisor 2023.04.0 Operating System 9.5 UI : 20230411.1 - latest
Thanks for confirming. I agree it's too big (and the ES5 entry is insanely big at 4 MB).
@bramkragten this needs some strategic dynamic importing IMO, but I see several comments wishing not to split code... ❓
@toxic0berliner I determined the biggest culprit here is that polyfills for Intl
in JS are being included in the entrypoints (which is certainly not desired). I fixed this for the ES5 frontend build in #16349 but a little more work is needed to fix for the supervisor builds.
Thanks a lto @steverep ! My new boysize limit is 5MB so that leaves room & time to fix but I fear others with reverse proxies might not find it as easy to fix so thanks for the nice effort of optimization !
Thanks for confirming. I agree it's too big (and the ES5 entry is insanely big at 4 MB).
@bramkragten this needs some strategic dynamic importing IMO, but I see several comments wishing not to split code... ❓
Since we only use a small portion of the supervisor panel in normal use now, and the rest is just legacy, I think it makes sense to optimize for the small path. I'll look into it tomorrow
Since we only use a small portion of the supervisor panel in normal use now, and the rest is just legacy, I think it makes sense to optimize for the small path. I'll look into it tomorrow
Excellent.. that'll hopefully drop the total bundle size a good amount. I already have a simple maneuver ready to get rid of all entrypoint size issues across the board, but I need to do some simple performance testing first.
Closing since the latest entrypoint is now under 500 KB and ES5 is under 1 MB, but know I'm trying to get them down more.
Thanks to all for the efforts and congrats for the great optim already done !
Checklist
Describe the issue you are experiencing
Entrypoint.something.js has grown beyond 1.4MB and is being truncated by default reverse proxy settings in nginx
Took me a while to fix and another while to unregister the service workers that cache this file.
Now it's working for me but I'm guessing many a reverse proxy user will struggle.
Maybe something can be done to compress the file or split it up or refactor and maybe nothing can be done, just wanted to report here this will probably cause some headaches...
Using HAOS and all updated to the latest stable version.
Describe the behavior you expected
No file above 1MB should be needed for the UI?
Steps to reproduce the issue
Load the UI over a nginx reverse proxy Observe entrypoint.xxxxx.js is truncated
What version of Home Assistant Core has the issue?
2023.3.6
What was the last working version of Home Assistant Core?
2023.3.4 or 5
In which browser are you experiencing the issue with?
all, not a browser issue but nginx default max body size
Which operating system are you using to run this browser?
all
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
Additional information
No response