Questions...
What is the processor (computer chip) and RAM of your computer?
What is your Operating System and version?
Is the computer and GoToMyPC up to date on drivers and versions of software?
What is the speed of your internet service?
Is the printer directly wired (USB or Ethernet cable?) into the computer you are logging into or is it on WiFi?
Do you refill your cartridges or buy OEM or aftermarket ones?
Are there print jobs still in the print queue or have all been cleared?
Did this slowness issue just occur or has it always been happening?
-----------------------------
What ever is being printed the file must first be translated from it's native code into machine code the printer can understand. This will cause a small file to become a large file, with image files, including PDF's, ballooning in size.
This new file is sent to the printer via the print spooler. If the file size is too big for the print spooler then the file is buffered (piecemealed) so that the printer can take X amount of the file at a time and begin printing. The larger the file the more the buffer is filled-emptied-filled-emptied over and over till printing is finished.
Complicating this is you are doing it over the internet, which may add time to the process from downloading, and through an intermediary - GoToMyPC - which may not only add more size to the transferred file but also add complexity to getting the file to the printer.
From the questions I asked above you probably surmised that your internet connection and your computer.
@PeterBJ asked about your model of printer. The amount of RAM in your printer also plays a part in the buffering of files being printed, which ultimately affects speed.
I Googled "
gotomypc printing slow" (without the quotation marks) and read a few links that discuss situations like yours. You are not alone. I recommend you read the Google links as the answer may be in there such as this link:
https://support.logmeininc.com/gotomypc/help/what-are-some-best-practices-for-printing-remotely