Slow login and Terminal loading time in Yosemite, possibly related to open directory I have a problem with slow login times in Yosemite.  Logging in is speedy after booting, but after a while (a few days usually) it slows down and can take 20-30 seconds.  The time to load a new Terminal window / tab also increases.  If I reboot, the problem is fixed...for a while.  I tried the answers in this question and nothing seemed to work.  I ran the profiling suggested here and this part of the output looks suspicious:

+   ! 8118 ???  (in login)  load address 0x10583c000 + 0x2a8f  [0x10583ea8f]
+   !   8118 openpam_dispatch  (in libpam.2.dylib) + 277  [0x7fff86957a7d]
+   !     8117 ???  (in &lt;unknown binary&gt;)  [0x1058c4bf2]
+   !     : 8117 ???  (in &lt;unknown binary&gt;)  [0x1058c40e9]
+   !     :   8117 ODRecordAuthenticationAllowed  (in CFOpenDirectory) + 258  [0x7fff9161df85]
+   !     :     8117 transaction_simple  (in CFOpenDirectory) + 448  [0x7fff91615274]
+   !     :       8117 _dispatch_semaphore_wait_slow  (in libdispatch.dylib) + 213  [0x7fff955c07f6]
+   !     :         8117 semaphore_wait_trap  (in libsystem_kernel.dylib) + 10  [0x7fff882b751a]


But further Googling hasn't turned up anything helpful for solving the problem.  Any ideas on how I can further diagnose or fix this issue?
I had the same problem everywhere authentication is needed after upgrading to High Sierra. Sampling login process gave similar output where ODRecordAuthenticationAllowed takes longer to complete than usual. The call graph shows that the authentication request dispatched from transaction_simple probably encountered some multithreading issue as caught by semaphore_wait_trap that consumed most of the runtime. So, something else must have been busy with authentication ALL the time. In my case the culprit turns out to be the printer. After updating the printer's driver and changing to use AirPrint from CUPS, login, terminal, browsing etc. are now all working to normal, and sampling login process again produces nothing as now the authentication request is too fast to catch.