• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

codeforamerica / ohana-api / 1060
99%
master: 99%

Build:
Build:
LAST BUILD BRANCH: mb-update-factory-bot
DEFAULT BRANCH: master
Ran 02 Sep 2015 02:59AM UTC
Jobs 1
Files 121
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1060

push

travis-ci

monfresh
Use SmarterCSV to optimize import script

The import script was consuming a lot of memory because it was reading
the CSV files with `File.read`, then loading the contents in an array
with `CVS.new.entries`.

The `File.read` part is not necessary since you can pass in a path
directly to `CSV.new` or `SmarterCSV.process`. SmarterCSV also provides
a way to load the contents in chunks to consume less memory.

These changes will help with memory consumption, but not speed.
The script takes so long because of the various `touch`es that are
required to populate the full-text search index.

The easiest way to speed up the import is to manually remove those
callbacks temporarily, then update the search index manually. On a
sample data set, this brought the total time down to 11 minutes from
31 minutes.

I've updated the installation instructions with these guidelines for
speeding up the script.

43 of 43 new or added lines in 14 files covered. (100.0%)

1735 of 1745 relevant lines covered (99.43%)

66.43 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1060.1 (2.2.2) 02 Sep 2015 02:59AM UTC 0
99.43
Travis Job 1060.1
Source Files on build 1060
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1060
  • 8ce077ed on github
  • Prev Build on 361-csv-memory (#1059)
  • Next Build on 361-csv-memory (#1062)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc