kocolosk opened a new pull request #3337:
URL: https://github.com/apache/couchdb/pull/3337


   ## Overview
   
   This patch introduces an escript that generates an Erlang .boot script to 
start CouchDB using the in-place .beam files produced by the compile phase of 
the build. This allows us to radically simplify the boot process for dev nodes 
as Erlang computes the optimal order for loading the necessary modules, and the 
previous logic in `boot_node` was, well, _not_ optimal 😄 
       
   In addition to the simplification this approach offers a nice startup time 
speedup, at least when working inside a container environment. In my test with 
the stock .devcontainer it reduces startup time from about 75 seconds down to 
under 5 seconds 🚀 
   
   I had initially introduced a new `devnode` target in the Makefile but 
figured just invoking the script if the `devnode.boot` file is missing would be 
sufficient. Note that this file can become outdated on the following conditions:
   
   - Change in Erlang version 
   - A new application is introduced to the source tree
   - Modules are removed from existing applications
   
   In each case running `make clean` or simply deleting the `devnode.boot` file 
will fix it. We could generate it every time but I figured it was maybe 
overkill for infrequent occurrences, and `make clean` is an easy fix.
   
   ## Testing recommendations
   
   Start a dev node with `./dev/run`. Try doing this after a `make clean; make` 
cycle and you should see a ~5 second delay during "Ensure Erlang boot script 
exists". Subsequent runs should be instantaneous at that step.
   
   ## Related Issues or Pull Requests
   
   <!-- If your changes affects multiple components in different
        repositories please put links to those issues or pull requests here.  
-->
   
   ## Checklist
   
   - [x] Code is written and works correctly
   - [ ] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in 
`rel/overlay/etc/default.ini`
   - [ ] A PR for documentation changes has been made in 
https://github.com/apache/couchdb-documentation
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to