perf tweak and url encoding