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

Quartz init takes a long time #169

Open
1 task
hu55a1n1 opened this issue Aug 20, 2024 · 5 comments
Open
1 task

Quartz init takes a long time #169

hu55a1n1 opened this issue Aug 20, 2024 · 5 comments

Comments

@hu55a1n1
Copy link
Member

Summary

$ time quartz init 

 ________       ___  ___      ________      ________     __________    ________     
|\   __  \     |\  \|\  \    |\   __  \    |\   __  \   |\___   ___\  |\_____  \    
\ \  \|\  \    \ \  \\\  \   \ \  \|\  \   \ \  \|\  \  \|___ \  \_|   \|___/  /|   
 \ \  \\\  \    \ \  \\\  \   \ \   __  \   \ \   _  _\      \ \  \        /  / /   
  \ \  \\\  \    \ \  \\\  \   \ \  \ \  \   \ \  \\  \       \ \  \      /  /_/__  
   \ \_____  \    \ \_______\   \ \__\ \__\   \ \__\\ _\       \ \__\    |\________\
    \|___| \__\    \|_______|    \|__|\|__|    \|__|\|__|       \|__|     \|_______|
          \|__|                                                                     
                                                                                    

{"Init":{"result_dir":"~/test/quartz_app"}}

real    1m23.552s
user    0m7.451s
sys     0m33.583s

Acceptance Criteria

  • quartz init runs much faster, and ideally takes no longer than a git clone of a small repo.
@hu55a1n1
Copy link
Member Author

Was able to reduce the time by ~50% by ignoring the target dir in app/transfers and building with --release ->

$ time quartz init 
# ...
real    0m44.928s
user    0m0.179s
sys     0m19.110s

@dangush
Copy link
Contributor

dangush commented Aug 21, 2024

Good things don't come quick!

@dangush
Copy link
Contributor

dangush commented Aug 21, 2024

Yeah I realized I hadn't set cargo generate to ignore the target folder after changing enclave and contract to output to the new top-level target folder. This is in #167 now

@ebuchman
Copy link
Member

Yeh it's copying all the target dirs and node_modules. There's target dirs in each of apps/transfers, apps/transfers/contracts, and apps/transfers/enclave, and then there's the node_modules in the frontend and possible in the transfers root and theres the apps/transfers/frontend/.next. Those are all like 100s of MBs. If I just delete them all the init takes under a second.

@ebuchman ebuchman added this to the Next Release milestone Oct 2, 2024
@ebuchman
Copy link
Member

ebuchman commented Oct 2, 2024

Or maybe we should make a real github template repo so it can just be git pulled? would probably still include it in examples/transfers but then also publish it as its own repo ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants