When you are in the ocean at a height where entities can not do spawn, they start loading and unloading entities very fast. It causes a pretty serious amount of lag. Reducing the amount of rendering distance can fix the problem for a while.
Replicate: position yourself in the ocean and climb to a considerable height, up to y = 200 for example. See the amount of entities that are generated, the ram consumption, console messages, etc.
VIDEO: https://youtu.be/uHc1Pd1Yla8
Linked issues
duplicates
Attachments
Comments

Thank you for your report!
However, this issue is a Duplicate of MC-91621.
If you have additional information, please add it to that report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Please do not mark unreleased versions as affected.
You don't have access to them yet.