I have a program (SAX parser using Text.XML.Expat.SAX ) that creates very large CDATA nodes using repetitive additions of Data.Text content using Data.Sequence.(|>) follows:
existingText |> newTextChunk
This creates a very large portion of Seq Text type Seq Text .
After I created the data, I need to convert Seq Text -> Text . But this solution I tried was super-slow:
Data.Foldable.foldr1 Data.Text.append seqText
Is there a faster way to turn a sequence of text into a regular text binding?
Another way to ask this may be that the most efficient way is to merge a list of text into one text, i.e. [Text] -> Text ?
source share