some performance tweaks for demo