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
In UI5 prior to 1.54, dataurl sourcemaps lead to a minute-long loading time. This can be fixed by backporting an updated regexp from the ui5loader, as visible here.
Furthermore it could be handled more safe by early-on failing data urls like suggested in #1914 (1.54) and #1916 (1.52 backport).
Since it is rather counter-intuitive behavior, it took me a while to spot dataurl sourcemaps and ui5 as culprits, so I decided to contribute this in order to save the time for others. I hope these PRs fit to your contribution model, please guide me if not.
Have a great week,
Bastian
Details
OpenUI5 version: Prior to 1.54
Browser/version (+device/version): Chrome 64
Any other tested browsers/devices(OK/FAIL):
URL (minimal example if possible):
User/password (if required and possible - do not post any confidential information here):
Steps to reproduce the problem:
Add a thirdparty library (266bytes for my compiled file) with a dataurl sourcemap //# sourceMappingURL=data:application/json;charset=utf-8;base64,....
Load UI5 in browser
For long, the network shows the thirdparty.js as pending
What is the expected result?
The library should load and the browser interprets the dataurl sourcemap so that the source files of that library are visible.
What happens instead?
For 40seconds, the network shows the thirdparty.js as pending. Then the file is loaded and behaves as expected. The chrome devtools performance profiler points to the regexp /[^\/]+\.js\.map$/ being tested during that time.
Any other information? (attach screenshot if possible)
In ui5loader, the regexp was changed from /[^\/]+\.js\.map$/ to /^[^\/]+\.js\.map$/ (Now testing from the beginning). This solves the problem for most data-urls since they usually contain an early slash in the mediatype (application/json),
so that the regexp parser kicks out fast. Since empty mediatypes or those without slash may theoretically occur, it may be useful to explicitly not parse data-urls at all.
The text was updated successfully, but these errors were encountered:
Since there was already created an internal record 1870087779 for your pull request which are connected to this issue, I will close this one. Please follow the status of the issue in your pull requests in GitHub.
Summary
In UI5 prior to 1.54, dataurl sourcemaps lead to a minute-long loading time. This can be fixed by backporting an updated regexp from the ui5loader, as visible here.
Furthermore it could be handled more safe by early-on failing data urls like suggested in #1914 (1.54) and #1916 (1.52 backport).
Since it is rather counter-intuitive behavior, it took me a while to spot dataurl sourcemaps and ui5 as culprits, so I decided to contribute this in order to save the time for others. I hope these PRs fit to your contribution model, please guide me if not.
Have a great week,
Bastian
Details
OpenUI5 version: Prior to 1.54
Browser/version (+device/version): Chrome 64
Any other tested browsers/devices(OK/FAIL):
URL (minimal example if possible):
User/password (if required and possible - do not post any confidential information here):
Steps to reproduce the problem:
//# sourceMappingURL=data:application/json;charset=utf-8;base64,....
What is the expected result?
The library should load and the browser interprets the dataurl sourcemap so that the source files of that library are visible.
What happens instead?
For 40seconds, the network shows the thirdparty.js as pending. Then the file is loaded and behaves as expected. The chrome devtools performance profiler points to the regexp
/[^\/]+\.js\.map$/
being tested during that time.Any other information? (attach screenshot if possible)
jquery.sap.global.js
until it was moved to the ui5loader./[^\/]+\.js\.map$/
to/^[^\/]+\.js\.map$/
(Now testing from the beginning). This solves the problem for most data-urls since they usually contain an early slash in the mediatype (application/json
),so that the regexp parser kicks out fast. Since empty mediatypes or those without slash may theoretically occur, it may be useful to explicitly not parse data-urls at all.
The text was updated successfully, but these errors were encountered: