improve perf for inline commands