-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Labels
Description
I would like to generate really big csv files with large amounts of rows.
public function export()
{
$this->viewBuilder()->className('CsvView.Csv');
$milionsOfRows = $this->SomeBigTable->find()->enableBufferedResults(false)->all();
$this->set('data',$milionsOfRows);
$this->set('_serialize','data');
}
Currently this plugin generates complete csv content before outputting it to the browser.
This can cause slowndowns or running out of memory when dealing with big number of rows.
I think it would be good idea to stream csv output instead (and flush() it every 100 rows)
tsmsogn