use Buffer.isEncoding
default throw error for xtemplate
update perf for xtpl