ApplicationProfileSetup is being called for each thread initialization. However, probably we could maintain a requestor level editable page to check if the initialization activity ran or not. Thanks for the suggestion Marc..
You could create a default starting activity. This activity is specified in the Operator record in the Security tab. The default is Data-Portal.ShowDesktop your activity could perform the steps you require and then call the OOTB Data-Portal.ShowDesktop activity to show the portal rule.