Convert output formats to use Data.Text.Lazy and SVG combinator library #56

Merged
merged 8 commits into from Sep 9, 2012
Commits on Aug 23, 2012
  1. @matthewSorensen

    Switch to using Data.Text.Lazy instead of String for output.

    matthewSorensen committed Aug 23, 2012
    Note that all of the existing formatting functions still build strings,
    so this commit introduces no performance gains. However, I plan on rewriting
    all of them using the relevant builder modules, so all of the output
    code paths should get much faster.
    
    (Commit 1/n of my quest to add efficient GHCLive support for ImplicitCAD.)
Commits on Aug 24, 2012
  1. @matthewSorensen

    Rewrite the SVG output code to use blaze-svg.

    matthewSorensen committed Aug 24, 2012
    Presumably, this has tremendous positive performance implications,
    but I haven't benchmarked it.
    
    (Commit 2/n of my quest to add efficient GHCLive support for ImplicitCAD.)
  2. @matthewSorensen

    Rewrite laser cutter output to use Data.Text.Lazy.Builder.

    matthewSorensen committed Aug 24, 2012
    Output is line-for-line identical to the previous version. Note that
    this does introduce a lower bound for base, as <> is a somewhat recent
    introduction.
    
    (Commit 3/n of my quest to add efficient GHCLive support for ImplicitCAD.)
  3. @matthewSorensen

    Update STL output.

    matthewSorensen committed Aug 24, 2012
  4. @matthewSorensen

    Create a new module Graphics.Implicit.Export.TextBuilderUtils to mana…

    matthewSorensen committed Aug 24, 2012
    …ge exports.
    
    Also switch all of the functions for showing integers and floats to
    the native Data.Text.Lazy.Builder.* functions.
    
    (Commit 5/n of my quest to add efficient GHCLive support for ImplicitCAD.)
Commits on Aug 25, 2012
  1. @matthewSorensen

    Re-implement the SCAD output module.

    matthewSorensen committed Aug 25, 2012
    Note that there's a really nice pretty printer inside that module
    just waiting for the Reader's context to change from ℝ to (ℝ,Int) and a
    few changes to call.
    
    Otherwise, this is the same story as all of the other rewrites - no
    more string concatenation and slightly less awkward parameter passing.
    
    Note that this does introduce a dependency on mtl, which may not be
    popular. This would also work with transformers, so...
    
    (Commit 6/6 of my quest to add efficient GHCLive support for ImplicitCAD.)
  2. @matthewSorensen
Commits on Aug 28, 2012
  1. @matthewSorensen

    Switch to a much larger buffer size (16 K chars, vs 128).

    matthewSorensen committed Aug 28, 2012
    This pretty much solves the performance issues vs. the original
    string implementation.