This is in a single-player world. After trading with a Cartographer and levelling him up to his second level, (the level where the woodland explorer map and ocean explorer map are unlocked) the game 'freezes' for up to 20 minutes. I can't open chests or interact with anything. After a little while, the game catches up and teleports me back to where I first traded with the villager (No time passes in-game.) This only happens when I level this villager up to the second level. I think this glitch has something to do with the explorer maps. Also, my CPU usage goes up to 80%-90% when this happens.
Linked issues
Attachments
Comments

Please attach a screenshot of this occurring while the F3 debug screen is enabled.
This issue is being temporarily closed as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Ok thanks tqz78. I am using an outdated Optifine. Thank you for pointing this out!

Thank you for your report!
We're tracking this issue in MC-228721, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as invalid. Please take a look at the parent ticket (MC-228721) and see if an explanation is provided there in the description of the ticket or in the comments for why this issue is invalid.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
If you're using an outdated version of OptiFine then this is a duplicate of MC-228721, resolved as "Invalid".