user5906: Each week so far it takes me over 1.5 hours to bring my dev environment up to date after updating the plutus-pioneer-program and plutus-app repos. This is really painful.
I'm wondering if someone can show me how to improve this startup time - possibly avoid unneeded steps, suggest some optimization settings (if any exist)...
I've listed my environment update process below. Any advice on how to streamline this and reduce my startup time would be much appreciated. Note I'm running on Intel Mac (BigSur), I'm in Cohort 3, I'm new to nix and cabal and for the first two weeks I had trouble getting the playground up reliably so after much experimenting I'm down to the following process that seems to work, but it takes a long time!
Summary of steps I need to do each week:

open a terminal and run from my PPP code directory:

cd plutus-pioneers-program
git pull origin plutus-pioneers-program // gets main branch


look inside code/weekxx/cabal.project and find latest plutus-app commit branch -> say ABCDEF
cd to plutus-app directory and do the following

 a) git pull origin plutus-apps // gets main branch 
 b) git checkout ABCDEF   // to align plutus-apps code with this week's ppp commit
 c) nix-build -A plutus-playground.client
 d) nix-build -A plutus-playground.server
 e) nix-build -A plutus-playground.generate-purescript
 f) nix-build -A plutus-playground.start-backend

Generally these first steps are reasonably fast although sometimes the nix-builds can take up to 5 min each.

Then I run

nix-shell -v   // -v gives verbose output... nice to watch that it is doing something  

this can take a long time each week: 30-60 min

within the shell I run

cd ../plutus-playground-client
plutus-playground-generate-purs    // this can take a while
GC_DONT_GC=1 plutus-playground-server   // start server


open a new terminal/tab at plutus-app root and run

nix-shell -v // again

generally the second nix shell is faster - completing in 5-10 minutes.

within this shell

cd ../plutus-playground-client
GC_DONT_GC=1 npm start   // to start the playground ui 


open a 3rd terminal/tab at plutus-app root and run

nix-shell -v // again for cabal repl

similar startup time to 2nd shell

within this 3rd shell access cabal repl with

cd ppproot/plutus-pioneers-program/code/weekxx   // where xx is week # like 03
cabal repl 

this takes another 30 minutes to load/build all the dependencies.  Do I really need them all?
At this point I finally have a stable playground to use !!

sometimes I also open another nix-shell and boot up the doc server if I need that.


user5556: You can create command aliases or write bash scripts to automate certain commands. An example of aliases I've written for myself (in Linux):
alias plutus-nix='cd /home/datapool/plutus-apps; GC_DONT_GC=1 nix-shell'
alias plutus-server='cd plutus-playground-client;  GC_DONT_GC=1 plutus- 
         playground-server'
alias plutus-client='cd plutus-playground-client;  GC_DONT_GC=1 npm 
         start'

So basically I just run commands like plutus-nix -> plutus-server when I want the server, and plutus-nix -> plutus-client when I want the client.
Bear in mind I can do this easily in Linux but I would think it should be OK to write aliases as well in MacOS.

user5760: My weekly setup steps are similar to yours. But there's a few steps you do that I skip and, so far, haven't had any issues.
I've never ran any of these:
nix-build -A plutus-playground.client
nix-build -A plutus-playground.server
nix-build -A plutus-playground.generate-purescript
nix-build -A plutus-playground.start-backend

or
plutus-playground-generate-purs

Everything else I do in basically the same order you do.

5906: <p>Each week so far it takes me over 1.5 hours to bring my dev environment up to date after updating the plutus-pioneer-program and plutus-app repos. This is really painful.</p>
<p>I'm wondering if someone can show me how to improve this startup time - possibly avoid unneeded steps, suggest some optimization settings (if any exist)...</p>
<p>I've listed my environment update process below. Any advice on how to streamline this and reduce my startup time would be much appreciated. Note I'm running on Intel Mac (BigSur), I'm in Cohort 3, I'm new to nix and cabal and for the first two weeks I had trouble getting the playground up reliably so after much experimenting I'm down to the following process that seems to work, but it takes a long time!</p>
<p>Summary of steps I need to do each week:</p>
<ol>
<li>open a terminal and run from my PPP code directory:</li>
</ol>
<pre><code>cd plutus-pioneers-program
git pull origin plutus-pioneers-program // gets main branch
</code></pre>
<ol start="2">
<li>look inside code/weekxx/cabal.project and find latest plutus-app commit branch -&gt; say ABCDEF</li>
<li>cd to plutus-app directory and do the following</li>
</ol>
<pre><code> a) git pull origin plutus-apps // gets main branch 
 b) git checkout ABCDEF   // to align plutus-apps code with this week's ppp commit
 c) nix-build -A plutus-playground.client
 d) nix-build -A plutus-playground.server
 e) nix-build -A plutus-playground.generate-purescript
 f) nix-build -A plutus-playground.start-backend
</code></pre>
<p>Generally these first steps are reasonably fast although sometimes the nix-builds can take up to 5 min each.</p>
<ol start="4">
<li>Then I run</li>
</ol>
<pre><code>nix-shell -v   // -v gives verbose output... nice to watch that it is doing something  
</code></pre>
<p>this can take a long time each week: 30-60 min</p>
<ol start="5">
<li>within the shell I run</li>
</ol>
<pre><code>cd ../plutus-playground-client
plutus-playground-generate-purs    // this can take a while
GC_DONT_GC=1 plutus-playground-server   // start server
</code></pre>
<ol start="6">
<li>open a new terminal/tab at plutus-app root and run</li>
</ol>
<pre><code>nix-shell -v // again
</code></pre>
<p>generally the second nix shell is faster - completing in 5-10 minutes.</p>
<ol start="7">
<li>within this shell</li>
</ol>
<pre><code>cd ../plutus-playground-client
GC_DONT_GC=1 npm start   // to start the playground ui 
</code></pre>
<ol start="8">
<li>open a 3rd terminal/tab at plutus-app root and run</li>
</ol>
<pre><code>nix-shell -v // again for cabal repl
</code></pre>
<p>similar startup time to 2nd shell</p>
<ol start="9">
<li>within this 3rd shell access cabal repl with</li>
</ol>
<pre><code>cd ppproot/plutus-pioneers-program/code/weekxx   // where xx is week # like 03
cabal repl 
</code></pre>
<p>this takes another 30 minutes to load/build all the dependencies.  <strong>Do I really need them all?</strong></p>
<p>At this point I finally have a stable playground to use !!</p>
<ol start="10">
<li>sometimes I also open another nix-shell and boot up the doc server if I need that.</li>
</ol>
 5556: <p>You can create command aliases or write bash scripts to automate certain commands. An example of aliases I've written for myself (in Linux):</p>
<pre><code>alias plutus-nix='cd /home/datapool/plutus-apps; GC_DONT_GC=1 nix-shell'
alias plutus-server='cd plutus-playground-client;  GC_DONT_GC=1 plutus- 
         playground-server'
alias plutus-client='cd plutus-playground-client;  GC_DONT_GC=1 npm 
         start'
</code></pre>
<p>So basically I just run commands like plutus-nix -&gt; plutus-server when I want the server, and plutus-nix -&gt; plutus-client when I want the client.</p>
<p>Bear in mind I can do this easily in Linux but I would think it should be OK to write aliases as well in MacOS.</p>
 5760: <p>My weekly setup steps are similar to yours. But there's a few steps you do that I skip and, so far, haven't had any issues.</p>
<p>I've never ran any of these:</p>
<pre><code>nix-build -A plutus-playground.client
nix-build -A plutus-playground.server
nix-build -A plutus-playground.generate-purescript
nix-build -A plutus-playground.start-backend
</code></pre>
<p>or</p>
<pre><code>plutus-playground-generate-purs
</code></pre>
<p>Everything else I do in basically the same order you do.</p>
