1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 04:51:57 +03:00

Avoid a redundant O(n) traversal of the terms.

This commit is contained in:
Rob Rix 2017-05-26 14:37:43 -04:00
parent 0b6a805ae5
commit ae6fff4a93

View File

@ -51,7 +51,7 @@ diffBlobPair decorator blobs = do
| nonExistentBlob left -> Just . pure $ Insert b
| otherwise -> Just $ runDiff (both a b)
where
runDiff terms = runBothWith diffTerms (terms `using` parTraversable rdeepseq)
runDiff terms = runBothWith diffTerms terms
-- | Parse a list of SourceBlobs and use the specified renderer to produce ByteString output.
parseBlobs :: (Monoid output, StringConv output ByteString, NFData (Record fields)) => (Source -> Term (Syntax Text) (Record DefaultFields) -> Term (Syntax Text) (Record fields)) -> Renderer (Identity SourceBlob, Term (Syntax Text) (Record fields)) output -> [SourceBlob] -> IO ByteString