While migrating our Team Sites from SharePoint 2010 to SharePoint On-line we noticed that response time of the sites on SharePoint Online was significantly slower than SharePoint 2010. Researching it we discovered that the issue was caused by our use of structural navigation, and led us to this article about Navigation Options for SharePoint Online.
While the article makes the case that Search based navigation good because it is security trimmed (as opposed to Managed Navigation), and fast (as opposed to Structural navigation), it states that Search based Navigation can only be implemented with a custom master page. This is incorrect.
Because the script produces the same navigation provided by the out of the box structural navigation, it works well with the PNP responsive-UI solution. The only downside I see is that users cannot reorder the navigation Items,
The Script can be downloaded here and uploaded to a location on your tenant.
To install the script on your site collection run the command: