Skip to content

Conversation

cprecioso
Copy link
Member

@cprecioso cprecioso commented Sep 29, 2025

Resolves #3147

In wasp-lang/open-saas#511 we made a GitHub action that pre-compresses the OpenSaaS template and allows it to be delivered via the GH CDN.

In this PR, we point wasp new to use that asset.

I didn't remove the code for declaring a template that downloads a GitHub repo the old way, but it is now unused. I would prefer to remove it, so we don't have dead code lying around, but somebody might feel it's useful so I'm waiting on your opinion.


On my laptop, it's 20x faster (from ~40s to ~2s)

Benchmark 1: local-wasp new -t saas project
  Time (mean ± σ):      2.029 s ±  0.556 s    [User: 1.418 s, System: 0.422 s]
  Range (min … max):    1.384 s …  3.047 s    10 runs
 
Benchmark 2: wasp new -t saas project
  Time (mean ± σ):     39.976 s ±  7.191 s    [User: 5.033 s, System: 2.069 s]
  Range (min … max):   28.133 s … 53.633 s    10 runs
 
Summary
  local-wasp new -t saas project ran
   19.71 ± 6.46 times faster than wasp new -t saas project

@cprecioso cprecioso linked an issue Sep 29, 2025 that may be closed by this pull request
@cprecioso cprecioso changed the title Use new release assets Use pre-built tarballs for wasp new -t saas Sep 29, 2025
@cprecioso cprecioso self-assigned this Sep 29, 2025
Comment on lines -162 to -164
simpleGhRepoTemplate :: (String, Path' Rel' Dir') -> (String, String) -> StartingInstructionsBuilder -> StarterTemplate
simpleGhRepoTemplate (repoName, tmplPathInRepo) (tmplDisplayName, tmplDescription) buildStartingInstructions =
GhRepoStarterTemplate
Copy link
Member Author

Choose a reason for hiding this comment

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

I had to remove the old function, or the linter complained


### 🔧 Small improvements

- Creating a new OpenSaaS project is now much faster (around 20x faster in our testing!). ([#3196](https://github.com/wasp-lang/wasp/pull/3196))
Copy link
Member Author

Choose a reason for hiding this comment

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

I felt like boasting a bit 😁

- In `StarterTemplates.hs` file, update git tag to new version of Wasp we are about to release (e.g. `wasp-v0.13.1-template`).
- Ensure that all starter templates are working with this new version of Wasp.
Update Wasp version in their main.wasp files, and update their code as neccessary. Finally, in their repos (for those templates that are on Github), create new git tag that is the same as the new one in `StarterTemplates.hs` (e.g. `wasp-v0.13.1-template`). Now, once new wasp release is out, it will immediately be able to pull the correct and working version of the starter templates, which is why all this needs to happen before we release new wasp version.
Update Wasp version in their main.wasp files, and update their code as neccessary. Finally, in their repos (for those templates that are on Github), create new git tag that is the same as the new one in `StarterTemplates.hs` (e.g. `wasp-v0.13.1-template`), and confirm that the GitHub action correctly ran and uploaded a `template.tar.gz` file. Now, once new wasp release is out, it will immediately be able to pull the correct and working version of the starter templates, which is why all this needs to happen before we release new wasp version.
Copy link
Member Author

Choose a reason for hiding this comment

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

On merging, I will update the release checklist on notion to add this note too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@cprecioso cprecioso marked this pull request as ready for review September 29, 2025 11:32
Copy link

cloudflare-workers-and-pages bot commented Oct 1, 2025

Deploying wasp-docs-on-main with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6cbcfd0
Status: ✅  Deploy successful!
Preview URL: https://43f6a128.wasp-docs-on-main.pages.dev
Branch Preview URL: https://cprecioso-3147-wasp-new--t-s.wasp-docs-on-main.pages.dev

View logs

@infomiho infomiho self-requested a review October 1, 2025 11:20
Copy link
Contributor

@infomiho infomiho left a comment

Choose a reason for hiding this comment

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

Left some questions, looking good overall!

@cprecioso
Copy link
Member Author

@infomiho ready

@infomiho infomiho self-requested a review October 3, 2025 13:44
Copy link
Contributor

@infomiho infomiho left a comment

Choose a reason for hiding this comment

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

Tested locally, LGTM

@cprecioso cprecioso merged commit ef6e800 into main Oct 6, 2025
7 checks passed
@cprecioso cprecioso deleted the cprecioso/3147-wasp-new--t-saas-mycoolsaasproject-is-slow branch October 6, 2025 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wasp new -t saas MyCoolSaasProject is slow

2 participants