I definitely remember this being mentioned somewhere, but searching the bug tracker produced no results.
Barriers and light blocks, rather than showing a single particle at their position, tend to show many coincident particles. This results in no visual difference (it may with translucent textures however I am yet to test this), as the particles are all rendered as perfectly coinciding with each other. With enough of the blocks present, this may result in significant lag, given that the game has to render easily around ten times as many particles as there are blocks for no real reason.
- Enter an area with no sources of particles near the player, such as a superflat world. Wait until the P parameter in the debug screen reaches 0 if need be.
- Place down a single barrier or light block
- Notice how, as the particles pop into view, the P value doesn't stop at 1
Only one particle would be generated for each barrier or light block, resulting in a P of 1
P instead fluctuates at higher values, rendering up to 15 particles for just a single block at times
The fix would be to make only one particle render for each block at a time. However, this may be difficult to do given how other particle-emitting blocks behave. It may be better to switch to a non-particle-based system for rendering blocks. Using a non-particle-based system would have the potential to fix several other issues with their rendering as well, such as MC-47660 (not appearing or disappearing immediately), MC-47607 and MC-221558 (not appearing at all with a low Particles graphics setting), and possibly allow for customizability and bring parity depending on how it is fixed.
This could be to render wireframe cubes at their positions instead (like how save structure blocks with Show Invisible Blocks enabled display them).
Alternatively, the blocks could be made to use models for when made visible instead. This would allow for more customizability as the models and textures associated with the blocks would be fully customizable, and would also be somewhat of a parity fix as this would bring Java Edition more in line with how Bedrock Edition handles structure voids. The cubes shown by structure blocks could also be changed to use models as well, potentially fixing rendering bugs such as MC-225940. An example resource pack may be attached in the future.