• This is for log shipping, correct?
    If so, did you see this post:
    https://www.sqlservercentral.com/Forums/1103972/extremely-slow-log-shipping-restore-in-standby-mode?PageIndex=2

    The "best" solution that I see from there was from dpaproskijr who said:
    we never did find a solution other than switching to "no recovery mode" and then back to standby once it was caught up or just backing up the source database and reestablishing the log shipping from scratch again. Fortunately, both disk and network speed have improved for us so much over the intervening years, starting again from scratch is pretty quick and easy now. 

    Also, if I understand what your log shows and what adb2303 says in the above post, that is all reading from and writing to a single VLF:
    If so, can you work out how many VLF's are being restored from the log backup: last LSN - first LSN? 

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.