How to Change the XRay Search Distance and Reduce Lag
Adjusting the Render Distance
Open the Advanced XRay interface and locate the distance or range setting. This controls how far from the player the mod scans for your selected blocks. A larger value reveals distant ores but increases the number of blocks being rendered and can hurt performance. Lower it when mining in tight areas or on a weaker machine.
Managing the Block List for Performance
Every enabled block in your list is checked and highlighted, so a long list costs more than a short one. Disable entries you are not currently hunting rather than deleting them, so you can re-enable them later. Keeping only a handful of active blocks at once is the single biggest performance win.
Colour and Visual Tweaks
Bright, high-contrast colours are easier to spot and let you use a shorter search distance without missing ores. Avoid assigning many blocks similar colours, since you will waste time distinguishing them. If the game stutters while the overlay is active, reduce the distance first, then trim the active block list. Toggle the mod off entirely when you are building or exploring rather than mining, and turn it back on when you actually need to locate ores.