SQL Server 2008 SP1 here.
We have a machine where sp_setapprole calls take more than 100ms and they are done many times per user operation on an application.
The developer says that in his setup, sp_setapprole calls take less than 1ms. The machine specs are comparable (I have 12GB RAM, 6 cores, he has 16GB and 8 cores).
This problem makes the application performance to be unacceptable.
So, two actual questions:
1.- What are possible causes (and solutions) of slow sp_setapprole?
2.- How would you debug the problem?