I've made a tool that's used by my team to enter Rightfax related requests for user access and delegation which has ended up being a huge time saver for the the whole team. We basically look up the fax number associated with a user, enter the new users AD login, click a button, and an entry is made in a database requesting that the new user is added as a delegate to the user associated with the fax number.
At that point I have a background process that runs, finds new entries in the database and submits the delegation commands through the .com API, then marks the request as complete.
The only issue I have is that the delegation requests seem to take an unusually long amount of time to get processed. Right now it seems to take anywhere from 2-5 minutes for a single delegation request to be executed. Is there anything that can be done that will increase the speed of the .com API requests? I think the issue is that when I add a user as a delegate, I call two functions, the first is to find the user associated with a fax number, and to do this, I use a for each loop on the User property to find the user who has the routing code equal to the fax number I'm looking for, set a variable equal to that user object, then execute a second function to add the requested user as a delegate to the previous user. It seems like the piece that's taking a long time is my for each loop to find the user associated with the supplied fax number.
Is there anyway I can either optimize my search, or modify some settings in rightfax or on the server to help decrease the amount of time it takes for these searches to complete?