alphagov/transition — pull request #234 by jamiecobbett (2014-03-28 16:05:19+00:00)
Title: Speed up Whitehall mappings import

Until now, we have been loading the host for each old URL in the CSV from the
database each time. This manually caches the hosts.

In development this changed the runtime for:
```
➜ transition git:(master) ✗ time FILENAME=tmp/1396018394-whitehall_mappings.csv be rake import:whitehall:mappings
```

from:
```
FILENAME=tmp/1396018394-whitehall_mappings.csv bundle exec rake 181.65s user 112.01s system 88% cpu 5:31.37 total
```

to:
```
FILENAME=tmp/1396018394-whitehall_mappings.csv bundle exec rake 95.10s user 54.83s system 86% cpu 2:53.45 total
```