V9: Fix backoffice javascript loading slowly #11714
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details
This fixes #10252 and #11393
The problem was that,
umbraco-backoffice-js.js
andumbraco-backoffice-extensions-js.js
loaded extremely slowly (~10 seconds for each), when the debug was set to false in the appsettings.Turns out this was actually two separate issues, but this PR fixes both, the
umbraco-backoffice-extensions-js.js
problem was actually a bug in Smidge, see this for more information.The
umbraco-backoffice-js.js
was simply because the Brotli compression for some reason is extremely slow, and smidge will always prefer this. This fix this issue I've replaced theRequestHelper
that comes with Smidge with our ownSmidgeRequestHelper
which then wraps the smidgeRequestHelper
, but changes the default, so Smidge will now default to gzip, and only use Brotli if there is no other option.Testing
appsettings.Development.json
fileappsettings.Development.json
Umbraco.TheStarterKit