I’m creating a user management page in Perspective that uses the user management scripting functions. When deleting a user, it takes over a minute for the deletion to actually reflect in the gateway (and in my user list table)
Is there some reason it’s this slow?
The code uses exactly the same path on the gateway as when you delete a user via the User Management component in Vision. It removes the user from the user profile, then notifies things that are listening for user changes that a change has been made.
These things happened basically instantly in my tests, but then my test gateway has no other users and pretty much nothing going on. Looking at the code, I see at least 6 different times the internal db needs to be accessed to delete a user – in a busy gateway that can be slow, especially if it’s on a slow HDD or the internal db is large.
This is just a gateway running on a local VM. I’m the only one using it. When I delete the user via the gateway, it works instantly but it still takes over a minute when deleting via a scripting function.
I’ve encountered something that could shed some light on what’s causing this.
My steps are as follows:
- Perform a user deletion via a script.
- The user won’t be deleted for a while and will continue to show up in the Gateway user management list.
- Delete a user in the Gateway before the first user shows up as deleted.
- Both users will now be instantly deleted.
Could something not be properly committing the change when it’s performed via a script? Or is there some form of polling on the user listing that is overridden by performing an action in the Gateway?
I’ve made a ticket to investigate this. Unfortunately I’m working on about 12 urgent things at once now, but someone should get to it soon.
Another update on behavior I’ve observed related to this: The same behavior occurs when adding a user via a script. It takes a while for the change to show up, but then if I add a user via a script and then perform another action in the Gateway user management, the script-added user is immediately added. I imagine the same will happen if I delete a user via a script and then add one via the Gateway.
More information that may be helpful: The same thing happens when adding/deleting/renaming roles.
This issue was fixed in the 8.0.4 RC. If you are still seeing this behavior, please let us know.