the performance hit usually comes from how much the browser has to re-rasterize that edge during each frame. i've had more luck using a conic-gradient on a pseudo-element with a slightly larger size and a
mask-image
to simulate the border. it keeps the main element's paint cycles low, though managing the
pixel perfect alignment is a pain.