Optimize performance of JSON rendering