Improved performance of json_encode()