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

codeforamerica / ohana-api / 1062 / 1
99%
master: 99%

Build:
Build:
LAST BUILD BRANCH: mb-update-factory-bot
DEFAULT BRANCH: master
Ran 02 Sep 2015 03:40AM UTC
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

02 Sep 2015 03:35AM UTC coverage: 99.427%. Remained the same
2.2.2

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.

1735 of 1745 relevant lines covered (99.43%)

66.43 hits per line

Source Files on job 1062.1 (2.2.2)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1062
  • Travis Job 1062.1
  • 35849fa0 on github
  • Prev Job for 2.2.2 on 361-csv-memory (#1060.1)
  • Next Job for 2.2.2 on 361-csv-memory (#1064.1)
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