Avoid quadratic slowdown in markdown rendering
Summary:
The `markdown_lite` parser is using left-associated list append; since the left hand operand is itself the result of a list append, we end up traversing it again and end up with a quadratic slowdown. In pathological cases in the linked tasks, where we have shapes with over 4000 fields(!), this brings rendering to a grinding halt.
This diff replaces append with cons & rev.
Reviewed By: Wilfred, hgoldstein
Differential Revision:
D36314037
fbshipit-source-id:
ce7f58f9f34292bd2c9bdbcc354edf8416cfca3f