On 1.21, there are a couple of scenarios I've found that cause high CPU:
Whenever a container inventory is opened, a CPU core becomes pegged until the inventory screen is closed (this includes containers that were not placed with HTM enabled).
Each time a player tries to open a container that they do not have access to, an additional CPU core becomes pegged. This seems to clear up as soon as the player opens a container they do have access to.
I am unable to replicate these issues on 1.20.1. I have not tested other versions between these.
Steps to reproduce scenario 1:
Player opens a container inventory
Observe CPU usage while inventory screen is open
Player closes inventory; CPU usage goes back down
Steps to reproduce scenario 2:
Player A places a chest set to PRIVATE
Player B right-clicks on it, gets the expected "Locked" message -- there are no visual indications of an issue, but a CPU core becomes pegged
Observe CPU usage increase each time Player B right-clicks on the chest
Player B right-clicks on a container that they can open; after closing it, all high CPU usage clears up
On 1.21, there are a couple of scenarios I've found that cause high CPU:
I am unable to replicate these issues on 1.20.1. I have not tested other versions between these.
Steps to reproduce scenario 1:
Steps to reproduce scenario 2: