SharePoint Online inventory
Well, I cannot tell why it's so slow, but this should solve your problem:

$sites = Get-SPOSite -Limit all -Detailed


-Detailed switch will cause Get-SPOSite to load all properties. It makes iterating all sites to get title unnecessary.