I have what I consider to be a fairly simple workflow that took more than ten minutes to complete. It calculates a due date based on the assigned priority of a task and a list of non-working days.
It starts by assigning a turn around time (1-3 days) based on the priority selected by the user,
It adds that number of days to the date received using the calculate date function
It uses a list query to see if that due date falls on one of the listed public holidays or weekends
It enters a iterative loop (while day off = true) adding one day to the due date and re querying the list until the new due date is a working day
It exits the loop
It writes the new due date to the list.
I ran this off a list entry where the next available working day would have been four days later and it took 11 minutes to complete. A two day delay took 6. Does anyone have any suggestions how i can optimise this to run faster or ideas why it might be so slow?