To be perfectly honest, that's cheating, it's not really one line, and not more efficient.
But besides that, don't worry about performance there. It probably won't cause any significant slowdown.
If it does, think about why you have to recreate the shape rather than reusing it.