performance improvement by streaming the json and csv data to the browser