I recently upgraded from 3.5.3.0 to 4.0.0.2 using the following instructions from Makarai:
Upgrade went smoothly and after initial database upgrade, library scan (4 & a half hours) and reinstall of some plugins, everything worked great...
I added some more media and did a manual library scan which took around 40 minutes (3.5.3.0 would scan in ~10 mins).
I have done a couple more scans and get the same results around 40 minutes per scan. The scan gets to around 90% in about 5 minutes and then the last 10% takes the rest of the time.
Any ideas about why it takes longer?