Electroblob's Wizardry

Electroblob's Wizardry

18M Downloads

[1.12.2] RenderArcaneLock.onRenderWorldLastEvent() slow

346184 opened this issue ยท 1 comments

commented

Minecraft version: 1.12.2
Wizardry version: 4.2.9
Environment: Hosted dedicated server, singleplayer

Issue details:

Profiling client rendering, I noticed that electroblob.wizardry.client.renderer.RenderArcaneLock.onRenderWorldLastEvent() takes quite a bit of time.

This is in a fresh world where nobody has used that spell yet.

  1. Should this take up to 10+ ms per invocation?
  2. Why does this trigger in a fresh world? Is this used in spawned structures?
  3. Is there a way to disable this?

Thanks for the great mod :)

commented

Yes, arcane-locked chests are used in spawned structures. I'm going to hazard a guess that the slow part is this line. Thinking about it, I probably shouldn't copy the global tile entity list every frame! I'll have to find another way of avoiding ConcurrentModificationExceptions there, I guess.

I also don't know why all the GL state changes are done regardless of whether there is anything near enough to be rendered... I obviously wasn't thinking when I wrote that code!

I doubt there's a way to disable this without disabling shrine generation entirely, unfortunately.