Sam 4232d32699 PERF: reduce workload when optimizing images
Previously, we would initialize an ImageOptim object each time we resize.

This object init is mega expensive (170ms on a VERY fast machine):

```
[1] pry(main)> Benchmark.measure { FileHelper.image_optim   }
=> #<Benchmark::Tms:0x00007f55440c1de0
 @cstime=0.055742,
 @cutime=0.141031,
 @label="",
 @real=0.17165619300794788,
 @stime=0.0002750000000000252,
 @total=0.19890400000000008,
 @utime=0.0018560000000000798>

```

This happens cause during init it hunts for all the right binaries and sets
up internals.

We now memoize this object to avoid a huge amount of pointless work.
2019-01-09 12:28:18 +11:00
..
2019-01-09 09:29:14 +11:00
2017-07-28 10:20:09 +09:00
2018-09-21 11:02:23 +00:00
2018-12-07 15:49:40 +00:00
2017-07-28 10:20:09 +09:00
2018-06-07 13:28:18 +08:00
2017-07-28 10:20:09 +09:00
2018-12-04 10:48:16 +01:00
2018-02-26 10:25:58 +11:00
2018-04-25 08:44:07 +10:00
2018-06-07 13:28:18 +08:00
2018-04-18 11:32:32 +05:30
2018-06-07 13:28:18 +08:00
2017-07-28 10:20:09 +09:00
2018-08-10 11:34:01 +10:00
2019-01-02 15:32:45 -05:00
2017-07-28 10:20:09 +09:00