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

First-time CLI builds are really slow #7

Closed
2 tasks done
arctic-hen7 opened this issue Sep 12, 2021 · 2 comments
Closed
2 tasks done

First-time CLI builds are really slow #7

arctic-hen7 opened this issue Sep 12, 2021 · 2 comments
Assignees
Labels
C-enhancement Category: enhancement C-performance Category: performance
Milestone

Comments

@arctic-hen7
Copy link
Member

arctic-hen7 commented Sep 12, 2021

The first time the CLI builds, it takes a very long time to complete. These are the stages it goes through for perseus serve:

  • Build all dependencies and the user's code (long)
  • Run static generation (almost instantaneous)
  • Build for Wasm (long)
  • Organize bundle (very quick)
  • Build all server dependencies and the user's code (long)
  • Run the server (almost instantaneous)

There are a few infrastructure changes I want to propose to shorten first-time builds (and all further builds for that matter). First, a workspace should be constructed in the preparation stage so that the two subcrates share a target/ directory, which means the server doesn't need to rebuild everything. Second, run the build for static generation and the Wasm build in parallel (which can be done for different targets).

These changes should significantly reduce initial build times, and further reduce later builds, making Perseus even faster in development. By increasing iteration time, we increase develop productivity, meaning people focus more on their own code and less on waiting at their terminals.

  • Create workspace at runtime
  • Parallelize builds
@arctic-hen7 arctic-hen7 self-assigned this Sep 12, 2021
@arctic-hen7 arctic-hen7 added this to the v0.2.0 milestone Sep 12, 2021
@arctic-hen7 arctic-hen7 added C-enhancement Category: enhancement C-performance Category: performance labels Sep 12, 2021
@arctic-hen7
Copy link
Member Author

Having created a workspace at runtime, it helps a bit. Parallelization will hopefully be much more effective though.

@arctic-hen7
Copy link
Member Author

This is complete, and will be released with v0.2.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: enhancement C-performance Category: performance
Projects
None yet
Development

No branches or pull requests

1 participant