Show processing dialog while process payroll running

When i click on create salary slip on process payroll ,it take many time but it don’t show that it works , how to show dialog that it running until finish . and how to reduce the time it takes ???

Can you share your broser console log