ku-fpg/blank-canvas — pull request #50 by RyanGlScott (2014-09-27 05:47:12+00:00)
Title: Replace internal use of String with Text

My attempt to resolve issue #17. This replaces most uses of `String` with `Data.Text.Lazy.Builder`, only converting to `Text` when absolutely needed (e.g., when passing to `kansas-comet`). Substantial changes were made to `Graphics.Blank.JavaScript` in order to get this to work.

Some notes:
* I had to change `Graphics.Blank.Generated` to accommodate `Builder`s, so the Perl script for auto-generating that probably doesn't work anymore.
* One place where I _didn't_ replace `String` with `Text` is in the `root` of the `Options` data type, since I wanted to avoid a breaking API change (also, since users might be passing in `FilePath`s, e.g., `root = "images" "house" <.> "jpg"`).

Also, here's a single data point for how fast this version runs on [`blank-canvas-mark`](https://github.com/ku-fpg/blank-canvas-mark) (compare to this [earlier data](https://github.com/ku-fpg/blank-canvas/issues/17#issuecomment-56996302)):

```
Name,Mean,MeanLB,MeanUB,Stddev,StddevLB,StddevUB
Bezier,1.040076543135013e-2,1.0112250785392872e-2,1.0899495033188157e-2,1.0193720571982175e-3,6.128090145679365e-4,1.7702867199432132e-3
CirclesRandomSize,8.291387149133046e-2,7.712200696986576e-2,8.887189180013762e-2,9.624390176463361e-3,6.751084843018664e-3,1.5116170366518616e-2
CirclesUniformSize,5.582968823307046e-2,5.443612077993745e-2,5.7925037732574784e-2,2.9598231365761257e-3,1.8520358903978391e-3,4.845389528469716e-3
FillText,4.287624766145773e-2,4.216626151577648e-2,4.455050811328371e-2,2.001835307569029e-3,7.268999318700638e-4,3.5422530153880736e-3
Image,0.9711201731098428,0.9236241789900482,1.0171682772246446,7.853378295365963e-2,0.0,7.975765591905833e-2
IsPointInPath,5.244449843200897e-2,4.763796877489932e-2,7.472115080849902e-2,1.5372842336351179e-2,1.2430653903288654e-3,2.7284272241679803e-2
Life,2.2852289130095342,2.2649865355184553,2.3038969610037885,3.1060499223686512e-2,0.0,3.233400760418315e-2
MeasureText,0.3550851813034697,0.3492619985032612,0.3590928893836561,6.020410237738866e-3,0.0,6.941554016787093e-3
Rave,2.017257804290342e-2,1.94804620842528e-2,2.339261464908541e-2,2.8576463176816585e-3,9.397796995505693e-4,5.691846050399972e-3
StaticAsteroids,0.2024348666619329,0.17725286779536412,0.2161091985818009,2.3483334228231997e-2,1.1692452535078968e-2,3.087522271606356e-2
```