Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui5 serve is very slow, can it do a pre-bundle before serving? #647

Open
HymanZHAN opened this issue Aug 31, 2022 · 1 comment
Open

ui5 serve is very slow, can it do a pre-bundle before serving? #647

HymanZHAN opened this issue Aug 31, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@HymanZHAN
Copy link

HymanZHAN commented Aug 31, 2022

Expected Behavior

A hello-world app served locally with ui5 serve should be fast.

Current Behavior

ui5 serve downloads the specified SAP libraries and serves several hundred unbundled JS files locally, which is pretty slow, even with browser cache enabled:
sapui5-local-dev-ui5-dynamic-network
Dynamically Generated by UI5 Tooling - Browser Cache Enabled

I tried to mitigate the issue by downloading my own local copy of SAPUI5 runtime, with no improvements at all as the downloaded libs are not bundled either:
sapui5-local-dev-network
With Downloaded resource folder from https://tools.hana.ondemand.com/#sapui5

Here is the result with a CDN link, which is what we do at work:
sapui5-local-dev-cdn-network
With CDN [https://ui5.sap.com:](https://ui5.sap.com/)

It is quite a bit faster, but it just feels wrong that an Internet connection is required for local development. And the connection stability cannot be 100% guaranteed. We've encountered unstable/slow connection issues before.

Steps to Reproduce the Issue

  1. Create a hello-world app with create-easy-ui5 and the ts-app preset.
  2. Start the app with npm start
  3. Inspect the network tab

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 2.14.10
  • Node.js Version: 16.6.0
  • npm Version: 8.15.1
  • OS/Platform: Ubuntu (WSL2)
  • Browser (if relevant): Firefox & Edge
  • Other information regarding your environment (optional): nothing

Log Output / Stack Trace

N/A

So my questions are:

  • Do the ui5-tooling team have a plan for a more performant local development experience (create bundles/dev-bundles for libraries before serving, utilizing webpack and hmr, etc)?
  • If not, where can I download a bundled version of SAPUI5 runtime to work around this issue?

Thanks!

@HymanZHAN HymanZHAN added bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Aug 31, 2022
@RandomByte
Copy link
Member

Do the ui5-tooling team have a plan for a more performant local development experience (create bundles/dev-bundles for libraries before serving, utilizing webpack and hmr, etc)?

Yes we do! Ultimately, we want to provide pre-built versions of all framework libraries on npm. Those would be identical to the sources you get from the CDN. But you can download them and work completely offline.

However, we can't provide any timeline for this right now.

@RandomByte RandomByte added enhancement New feature or request and removed bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants