datacamp
datacamp copied to clipboard
Optimize importing from file
http://github.com/Stiivi/datacamp/blob/master/lib/csv_importer.rb
- Let's not create ActiveRecord instance for each imported line, it will take lots of resources when importing huge file.
- Optimize reading map (transform into array once, don't look for items for each column)