Backstory: working on a speedrunning datapack. Currently not planning to use it to submit any runs; this is mostly an exercise for me to learn vanilla datapacks since Paper is banned for speedruns. This happens both on a stock vanilla server and on a Fabric+Lithium server.
I'm finding that I have a weird lag problem on my server, but it's very predictable. Crossing into the end dimension (using setblock ~ ~ ~ end_portal so I don't have to find a stronghold) causes 15-30 seconds where the server is unresponsive. Using Fabric+Spark to profile showed me that chunk generation caused by EnderDragonFight is the problem.
The strange thing is that world generation keeps up fine with player activity for everything else; it seems to specifically happen when the End is first loaded.
I found that if I used my datapack to forceload a 4x4 chunk area centered on 0, 0 in the End, it seemed to make the issue go away.
Has anyone else encountered this problem? Any explanation?