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

Win fixes for Makefile, and WSL speedup #1975

Merged
merged 2 commits into from
May 14, 2024
Merged

Win fixes for Makefile, and WSL speedup #1975

merged 2 commits into from
May 14, 2024

Conversation

illume
Copy link
Collaborator

@illume illume commented May 13, 2024

  • Makefile: Fix run-backend run-frontend on win cmdline
  • frontend: Makefile: Add priority to dev server for running in VMs

How to test

In cmd shell on windows

These work again:

make run-frontend
make run-backend

In WSL on windows

make run-frontend is generally faster.

Save a component and note the time compiling. Over 10 times there is much less variation in timing. Whereas without this it's 2x - 3x slower often.

illume added 2 commits May 13, 2024 12:15
This works with Windows, because before setting environment
variables did not work when using cmd or powershell.

Signed-off-by: René Dudfield <renedudfield@microsoft.com>
This speeds things up on WSL a lot. Because in a VM it can be
2x-3x as slow often. It's only getting priority when compiling,
so that is usually what we want when running the dev server.

Signed-off-by: René Dudfield <renedudfield@microsoft.com>
@illume illume added bug Something isn't working windows Issues related to Windows or WSL performance labels May 13, 2024
@illume illume requested a review from a team May 13, 2024 10:25
@illume illume added the dx label May 13, 2024
Copy link
Contributor

@skoeva skoeva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runs much faster on my end, very much appreciated fix!

@sniok
Copy link
Contributor

sniok commented May 13, 2024

I have a theory that it's not nice that makes it faster but removal of the env variable.

Try this on main branch:
cd frontend && REACT_APP_HEADLAMP_BACKEND_TOKEN=headlamp npm start
for me around ~16s

but
cd frontend && npm start
around ~3s

🤔

although after trying to run strace on it I can't reproduce it anymore. strange

@illume
Copy link
Collaborator Author

illume commented May 13, 2024

@sniok how bizarre! I can't see that behaviour myself with the environment variable.

Note, setting REACT_APP_HEADLAMP_BACKEND_TOKEN is redundant in the Makefile, since it's already set inside the "npm start" script.

@illume illume merged commit 63028dd into main May 14, 2024
15 checks passed
@illume illume deleted the win-fixes branch May 14, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dx performance windows Issues related to Windows or WSL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants