I have a situation when a new item in the Contributor tree (application hierarchy item) is added and the rights need to be applied for a user. TI process controls everything by adding the new item, fixing the hierarchy subset, generating the rights files and runs the app_maintenance.bat. Everything runs fine, but it takes ages to update as app_maintenance.bat is very slow.

So, I am doing the follow:
app_maintenance.bat -serviceUrl {myserver}:9510 -username {myuser} -userpwd {mypwd} -CAMNamespace {mynamespace} -applicationid {appid} -op deactivate
app_maintenance.bat -serviceUrl {myserver}:9510 -username {myuser} -userpwd {mypwd} -CAMNamespace {mynamespace} -applicationid {appid} -op refreshrights
app_maintenance.bat -serviceUrl {myserver}:9510 -username {myuser} -userpwd {mypwd} -CAMNamespace {mynamespace} -applicationid {appid} -op importrights -rightsfile "D:\DMS\Objects\Tmp\App_Security_SPECIAL_CHARGE.txt" -merge
app_maintenance.bat -serviceUrl {myserver}:9510 -username {myuser} -userpwd {mypwd} -CAMNamespace {mynamespace} -applicationid {appid} -op refreshrights
app_maintenance.bat -serviceUrl {myserver}:9510 -username {myuser} -userpwd {mypwd} -CAMNamespace {mynamespace} -applicationid {appid} -op activate
In summary: (1) deactivate the application, (2) updating the items, (3) loading rights, (4) running refresh for the rights, (5) activating the application
Deactivate and activate options are there as IBM support recommends it about some errors I was facing in the app_maintenance execution. As they mention, users should not be accessing the application while it is running, so the process checks if someone is online.
So, here is my question: do I need to do all this to insert a new item and apply the security?