More perf improvements and image compression