- Before a new release is installed, the
- release_handler checks that no processes have
- references to old code of any of the modules that are to be
- loaded. This operation can be very time consuming,
- especially if there are many processes in the system, since
- it might cause garbage collections and copying of data.
- If it is desirable to reduce the time spent in this
- function, then check_install_release/1
- might be called first. This function does the same check for
- old code, including garbage collection, and can be done in
- the background before actually starting the upgrade by
- calling install_release.
- Code might even be purged (using
- code:purge/1) after
- check_install_release in order to completely
- avoid the check for old code during
- install_release.
+ Installing a new release might be quite time consuming if
+ there are many processes in the system. The reason is that
+ each process must be checked for references to old code
+ before a module can be purged. This check might lead to
+ garbage collections and copying of data.
+ If you wish to speed up the execution of
+ install_release, then you may call check_install_release
+ first, using the option purge. This will do the same
+ check for old code, and then purge all modules that can be
+ soft purged. The purged modules will then no longer have any
+ old code, and install_release will not need to do the
+ checks.
+ Obviously, this will not reduce the overall time for the
+ upgrade, but it will allow checks and purge to be executed
+ in the background before the real upgrade is started.