Preventing staging site restart during a swap

You are right that the staging slot will always be restarted prior to the swap if there are app settings or connection strings marked as slot settings. There are a few other conditions that cause restart, for example when continuous deployment is enabled as described here http://ruslany.net/2014/03/azure-web-sites-continuous-deployment-with-staged-publishing/. Other reason for restart is when site authentication is enabled on either production or the staging slots.

If there is no restart then appinit module will not be re-executed during the swap because it only runs when the worker process is initialized. If you want to ensure that there is always restart then you can just create some dummy app setting and mark it as a slot setting.