export = FCSV.generate(:col_sep => l(:general_csv_separator)) do |csv|
..
end
format.csv {send_data(export), :type => 'text/csv;header=present',:filename => 'export.csv') }
I want to export large amounts of data.But it bring a serious performance problems and it filled my memory.Any better ways to export csv?
FCSV is the same as FasterCSV, right?
2 suggestions to deal with the memory:
If the generation take too much time to execute, then you'll have to profile the code then try to improve it... Alternatively, do the generation as a background task and allow the user to fetch it later.