Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large inline images use a lot of memory #10075

Closed
ebeigarts opened this issue Aug 9, 2024 · 17 comments
Closed

Large inline images use a lot of memory #10075

ebeigarts opened this issue Aug 9, 2024 · 17 comments
Labels

Comments

@ebeigarts
Copy link

ebeigarts commented Aug 9, 2024

Here is an example HTML file (10Mb) with one embedded JPEG image (7.6Mb).

Memory usage:

  • html to md uses 2985M
  • md to docx uses 3435M
  • html to docx uses 4350M

Test examples:

pandoc --version
pandoc 3.3

pandoc +RTS -t -RTS -o test.md test.html
# <<ghc: 30556315048 bytes, 3666 GCs, 248986086/1293885312 avg/max bytes residency (13 samples), 2985M in use, 0.001 INIT (0.001 elapsed), 2.773 MUT (2.511 elapsed), 2.892 GC (3.461 elapsed) :ghc>>

pandoc +RTS -t -RTS -o test.docx test.md
# <<ghc: 105686485256 bytes, 12695 GCs, 434087025/1466902032 avg/max bytes residency (19 samples), 3435M in use, 0.002 INIT (0.002 elapsed), 10.349 MUT (10.101 elapsed), 7.732 GC (8.308 elapsed) :ghc>>

pandoc +RTS -t -RTS -o test.docx test.html
# <<ghc: 76105089872 bytes, 9099 GCs, 489199853/1886265928 avg/max bytes residency (20 samples), 4350M in use, 0.002 INIT (0.002 elapsed), 8.025 MUT (7.772 elapsed), 9.163 GC (10.023 elapsed) :ghc>>

OS: macOS 14.14.1, m3/arm

@ebeigarts ebeigarts added the bug label Aug 9, 2024
@jgm
Copy link
Owner

jgm commented Aug 9, 2024

This does seem to have to do with inline (base64-encoded) images specifically. I tried the same file but with a linked image, and it only used 30 MB.

@jgm
Copy link
Owner

jgm commented Aug 9, 2024

Odd that even html -> md takes a lot of memory, even though the URL should just be passed through unchanged.

@jgm
Copy link
Owner

jgm commented Aug 9, 2024

If we do html -> json and then json -> md, that takes 956M for the first step and 810M for the second. So, it's neither a reader nor a writer issue exclusively. json -> html takes 1768M. But json -> json is fast.

I'd need to do some profiling to track this down further.

@jgm
Copy link
Owner

jgm commented Aug 9, 2024

Profiling, first three entries for html -> md:

COST CENTRE             MODULE                           SRC                                                       %time %alloc

parseURI                Network.URI                      Network/URI.hs:301:1-26                                    17.4   21.5
escapeURI               Text.Pandoc.URI                  src/Text/Pandoc/URI.hs:(31,1)-(32,65)                      17.2   21.0
parseURIReference       Network.URI                      Network/URI.hs:308:1-44                                    16.1   21.5

@jgm
Copy link
Owner

jgm commented Aug 9, 2024

parseURI gets called in both the reader and the writer, it seems.
In the reader as part of canonicalizeUrl.
IN the writer as part of isURI (which is used to check whether an "auto-link" should be used).

It seems that parseURI may be slow and could perhaps be optimized (it's in Network.URI so not part of pandoc).

We could also think about whether we could avoid calling it.

@jgm
Copy link
Owner

jgm commented Aug 9, 2024

Yeah, here's the problem (network-uri):
Network/URI.hs

The URI parser parses multiple segments and concatenates them. (Each segment is basically a path component starting with /). But look at the segment parser:

segment :: URIParser String
segment =
    do  { ps <- many pchar
        ; return $ concat ps
        }

This parses many small strings, one for each pchar (usually just one character!) and then concatenates them. I think that allocating thousands or millions or small strings and concatenating them is causing the memory blowup.

This should be pretty easy to optimize. I'm surprised nobody has run into this before, as this is a widely used package!

For reference, here is pchar:

segmentNz :: URIParser String
segmentNz =
    do  { ps <- many1 pchar
        ; return $ concat ps
        }

segmentNzc :: URIParser String
segmentNzc =
    do  { ps <- many1 (uchar "@")
        ; return $ concat ps
        }

pchar :: URIParser String
pchar = uchar ":@"

-- helper function for pchar and friends
uchar :: String -> URIParser String
uchar extras =
        unreservedChar
    <|> escaped
    <|> subDelims
    <|> do { c <- oneOf extras ; return [c] }

@jgm
Copy link
Owner

jgm commented Sep 6, 2024

I've made the patch to parseURI, so you'll notice a new difference once a new version of network-uri is released; but it's not going to make a HUGE difference, because that function is still fairly inefficient.

We could think about trying a different URI library, maybe uri-bytestring.

@ebeigarts
Copy link
Author

Thanks @jgm, really nice explanation

@silby
Copy link
Contributor

silby commented Dec 1, 2024

I have a not-polished-yet diff that uses an Attoparsec parser to identify valid base64-encoded data: URLs without extra allocation that skips Network.URI as a fast path, which saves hundreds of megs of allocation and a lot of runtime and gc in the html reader case. There's still multiple gigs of allocation and profiling indicates that the next allocation cost centers are in TagSoup:

output           Text.HTML.TagSoup.Implementation src/Text/HTML/TagSoup/Implementation.hs:(80,1)-(142,44)   25.6   18.1
expand           Text.HTML.TagSoup.Implementation src/Text/HTML/TagSoup/Implementation.hs:(49,1)-(60,30)    21.3   23.7
parse            Text.HTML.TagSoup.Specification  src/Text/HTML/TagSoup/Specification.hs:35:1-19             9.2   13.5

I don't really know how to play "spot the allocation" but here's expand, for instance

https://github.com/ndmitchell/tagsoup/blob/294a67dd9452e29570e2a3eccd76993cf075aba6/src/Text/HTML/TagSoup/Implementation.hs#L48-L60

@silby
Copy link
Contributor

silby commented Dec 2, 2024

Interestingly, the markdown reader case seems to have a completely different bottleneck once the URL parsing is removed as a problem, but something really odd is going on with the cost center nesting in the profile that I can't make sense of.

(Note that the unreasonable memory usage is visible even with images that are several KB, as opposed to several MB; small.md here is 104K and total alloc in the profile is 458MB.)

profile behind the cut
	Sun Dec  1 16:22 2024 Time and Allocation Profiling Report  (Final)

	   pandoc +RTS -A8m -p -RTS --trace -o aaa.md small.md

	total time  =        0.10 secs   (97 ticks @ 1000 us, 1 processor)
	total alloc = 458,333,720 bytes  (excludes profiling overheads)

COST CENTRE             MODULE                             SRC                                                   %time %alloc

parseFromString         Text.Pandoc.Parsing.General        src/Text/Pandoc/Parsing/General.hs:(418,1)-(426,15)    55.7   62.2
satisfy                 Text.Pandoc.Sources                src/Text/Pandoc/Sources.hs:(157,1)-(159,46)            15.5   19.2
updateLastStrPos        Text.Pandoc.Parsing.Capabilities   src/Text/Pandoc/Parsing/Capabilities.hs:124:1-69       14.4    9.4
skipMany                Data.Attoparsec.Combinator         Data/Attoparsec/Combinator.hs:(220,1)-(221,40)          2.1    0.0
char                    Text.Pandoc.Sources                src/Text/Pandoc/Sources.hs:175:1-23                     2.1    1.5
renderPlain             Text.DocLayout                     src/Text/DocLayout.hs:(378,1)-(379,41)                  1.0    0.1
literal                 Text.DocLayout                     src/Text/DocLayout.hs:(642,1)-(649,20)                  1.0    0.0
gridTable               Text.GridTable.Parse               src/Text/GridTable/Parse.hs:(26,1)-(34,24)              1.0    0.0
anyLine                 Text.Pandoc.Parsing.General        src/Text/Pandoc/Parsing/General.hs:(169,1)-(188,28)     1.0    0.0
optToOutputSettings     Text.Pandoc.App.OutputSettings     src/Text/Pandoc/App/OutputSettings.hs:(63,1)-(276,5)    1.0    0.0
CAF                     Text.Pandoc.App.CommandLineOptions <entire-module>                                         1.0    0.0
readFileStrict          Text.Pandoc.Class.IO               src/Text/Pandoc/Class/IO.hs:180:1-43                    1.0    0.0
toplevel.toSources      Text.Pandoc.Readers.Markdown       src/Text/Pandoc/Readers/Markdown.hs:70:74-84            1.0    0.8
the_blocks              Text.Pandoc.Readers.Markdown       src/Text/Pandoc/Readers/Markdown.hs:319:38-48           1.0    0.0
tabFilter               Text.Pandoc.Shared                 src/Text/Pandoc/Shared.hs:(257,1)-(265,42)              1.0    0.0
realLengthNarrowContext Text.DocLayout                     src/Text/DocLayout.hs:936:1-63                          0.0    1.3
charsInBalanced         Text.Pandoc.Parsing.General        src/Text/Pandoc/Parsing/General.hs:(453,1)-(460,22)     0.0    1.8
characterReference      Text.Pandoc.Parsing.General        src/Text/Pandoc/Parsing/General.hs:(583,1)-(588,54)     0.0    1.8
noneOf                  Text.Pandoc.Sources                src/Text/Pandoc/Sources.hs:167:1-34                     0.0    1.5


                                                                                                                                                                                 individual      inherited
COST CENTRE                                                  MODULE                              SRC                                                         no.      entries  %time %alloc   %time %alloc

MAIN                                                         MAIN                                <built-in>                                                  1797           0    0.0    0.0   100.0  100.0
 CAF                                                         Main                                <entire-module>                                             3591           0    0.0    0.0     0.0    0.0
  main                                                       Main                                src/pandoc.hs:(48,1)-(68,53)                                3594           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Lua.Engine              <entire-module>                                             3440           0    0.0    0.0     0.0    0.0
  getEngine                                                  Text.Pandoc.Lua.Engine              src/Text/Pandoc/Lua/Engine.hs:(35,1)-(44,5)                 3597           0    0.0    0.0     0.0    0.0
   getglobal                                                 HsLua.Core.Primary                  src/HsLua/Core/Primary.hs:(250,1)-(252,66)                  3609           1    0.0    0.0     0.0    0.0
    liftLuaThrow                                             HsLua.Core.Error                    src/HsLua/Core/Error.hs:159:1-56                            3610           1    0.0    0.0     0.0    0.0
     liftLua                                                 HsLua.Core.Types                    src/HsLua/Core/Types.hs:107:1-32                            3611           1    0.0    0.0     0.0    0.0
   tostring                                                  HsLua.Core.Primary                  src/HsLua/Core/Primary.hs:(990,1)-(997,61)                  3621           1    0.0    0.0     0.0    0.0
    liftLua                                                  HsLua.Core.Types                    src/HsLua/Core/Types.hs:107:1-32                            3622           1    0.0    0.0     0.0    0.0
   fromString                                                HsLua.Core.Utf8                     src/HsLua/Core/Utf8.hs:39:1-45                              3616           0    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.App                     <entire-module>                                             3356           0    0.0    0.0     0.0    0.0
  convertWithOpts                                            Text.Pandoc.App                     src/Text/Pandoc/App.hs:(79,1)-(128,52)                      3650           0    0.0    0.0     0.0    0.0
   setTranslations                                           Text.Pandoc.Translations            src/Text/Pandoc/Translations.hs:(47,1)-(48,72)              3654           1    0.0    0.0     0.0    0.0
   runIO                                                     Text.Pandoc.Class.PandocIO          src/Text/Pandoc/Class/PandocIO.hs:36:1-59                   3663           0    0.0    0.0     0.0    0.0
    readDataFile                                             Text.Pandoc.Data                    src/Text/Pandoc/Data.hs:(71,1)-(79,42)                      3726           1    0.0    0.0     0.0    0.0
     checkUserDataDir                                        Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:(398,1)-(401,24)       3728           1    0.0    0.0     0.0    0.0
      getUserDataDir                                         Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:312:1-46               3731           1    0.0    0.0     0.0    0.0
      makeCanonical                                          Text.Pandoc.Shared                  src/Text/Pandoc/Shared.hs:(730,1)-(735,34)                  3730           0    0.0    0.0     0.0    0.0
     readDefaultDataFile                                     Text.Pandoc.Data                    src/Text/Pandoc/Data.hs:(43,1)-(53,36)                      3739           1    0.0    0.0     0.0    0.0
      makeCanonical                                          Text.Pandoc.Shared                  src/Text/Pandoc/Shared.hs:(730,1)-(735,34)                  3741           0    0.0    0.0     0.0    0.0
    optToOutputSettings                                      Text.Pandoc.App.OutputSettings      src/Text/Pandoc/App/OutputSettings.hs:(63,1)-(276,5)        3676           0    0.0    0.0     0.0    0.0
     parseFlavoredFormat                                     Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:(120,1)-(141,55)                  3678           1    0.0    0.0     0.0    0.0
      noneOf                                                 Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:167:1-34                         3683           0    0.0    0.0     0.0    0.0
       satisfy                                               Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 3684           0    0.0    0.0     0.0    0.0
      oneOf                                                  Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:163:1-30                         3687           0    0.0    0.0     0.0    0.0
       satisfy                                               Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 3688           0    0.0    0.0     0.0    0.0
        noneOf                                               Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:167:1-34                         3689           0    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Data                    <entire-module>                                             3355           0    0.0    0.0     0.0    0.0
  defaultUserDataDir                                         Text.Pandoc.Data                    src/Text/Pandoc/Data.hs:(236,1)-(245,23)                    3637           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Extensions              <entire-module>                                             3353           0    0.0    0.0     0.0    0.0
  extensionsFromList                                         Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:187:1-46                      3774           1    0.0    0.0     0.0    0.0
  pandocExtensions                                           Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:(214,1)-(261,3)               3773           1    0.0    0.0     0.0    0.0
   extensionsFromList                                        Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:187:1-46                      3775           0    0.0    0.0     0.0    0.0
  getDefaultExtensions                                       Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:(357,1)-(478,64)              3772           0    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Format                  <entire-module>                                             3352           0    0.0    0.0     0.0    0.0
  formatFromFilePaths                                        Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:169:1-51                          3656           1    0.0    0.0     0.0    0.0
  parseFlavoredFormat                                        Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:(120,1)-(141,55)                  3680           0    0.0    0.0     0.0    0.0
   noneOf                                                    Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:167:1-34                         3681           1    0.0    0.0     0.0    0.0
    satisfy                                                  Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 3682           1    0.0    0.0     0.0    0.0
   oneOf                                                     Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:163:1-30                         3685           1    0.0    0.0     0.0    0.0
    satisfy                                                  Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 3686           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Shared                  <entire-module>                                             3351           0    0.0    0.0     0.0    0.0
  makeCanonical                                              Text.Pandoc.Shared                  src/Text/Pandoc/Shared.hs:(730,1)-(735,34)                  3729           1    0.0    0.0     0.0    0.0
  trimr                                                      Text.Pandoc.Shared                  src/Text/Pandoc/Shared.hs:194:1-27                          3990           1    0.0    0.0     0.0    0.0
  tabFilter                                                  Text.Pandoc.Shared                  src/Text/Pandoc/Shared.hs:(257,1)-(265,42)                  3786           0    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Sources                 <entire-module>                                             3350           0    0.0    0.0     0.0    0.0
  ensureFinalNewlines                                        Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(99,1)-(109,76)                  3787           0    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Readers                 <entire-module>                                             3344           0    0.0    0.0     0.0    0.0
  readers                                                    Text.Pandoc.Readers                 src/Text/Pandoc/Readers.hs:(126,1)-(171,11)                 3668           0    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Readers.Markdown        <entire-module>                                             3341           0    0.0    0.0     0.0    0.0
  updateLastStrPos                                           Text.Pandoc.Parsing.Capabilities    src/Text/Pandoc/Parsing/Capabilities.hs:124:1-69            3914           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Writers                 <entire-module>                                             3308           0    0.0    0.0     0.0    0.0
  writers                                                    Text.Pandoc.Writers                 src/Text/Pandoc/Writers.hs:(139,1)-(206,3)                  3699           0    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Writers.Markdown        <entire-module>                                             3290           0    0.0    0.0     0.0    0.0
  char                                                       Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:175:1-23                         4090           2    0.0    0.0     0.0    0.0
   satisfy                                                   Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 4091           2    0.0    0.0     0.0    0.0
  anyOrderedListMarker                                       Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(159,1)-(162,75)           4076           1    0.0    0.0     0.0    0.0
   char                                                      Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:175:1-23                         4084          10    0.0    0.0     0.0    0.0
    satisfy                                                  Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 4085          10    0.0    0.0     0.0    0.0
   decimal                                                   Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(104,1)-(106,55)           4078           1    0.0    0.0     0.0    0.0
    digit                                                    Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:203:1-23                         4080           1    0.0    0.0     0.0    0.0
     satisfy                                                 Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 4081           1    0.0    0.0     0.0    0.0
   lowerAlpha                                                Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(142,1)-(144,43)           4092           1    0.0    0.0     0.0    0.0
    satisfy                                                  Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 4094           1    0.0    0.0     0.0    0.0
   lowerRoman                                                Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(98,1)-(100,26)            4097           1    0.0    0.0     0.0    0.0
    romanNumeral                                             Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(60,1)-(88,24)             4099           1    0.0    0.0     0.0    0.0
     char                                                    Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:175:1-23                         4101           7    0.0    0.0     0.0    0.0
      satisfy                                                Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 4102           7    0.0    0.0     0.0    0.0
   upperAlpha                                                Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(148,1)-(150,43)           4106           1    0.0    0.0     0.0    0.0
    satisfy                                                  Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 4108           1    0.0    0.0     0.0    0.0
   upperRoman                                                Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(92,1)-(94,26)             4113           1    0.0    0.0     0.0    0.0
    romanNumeral                                             Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(60,1)-(88,24)             4115           1    0.0    0.0     0.0    0.0
     char                                                    Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:175:1-23                         4117           7    0.0    0.0     0.0    0.0
      satisfy                                                Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 4118           7    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.UTF8                    <entire-module>                                             3264           0    0.0    0.0     0.0    0.0
  encodePath                                                 Text.Pandoc.UTF8                    src/Text/Pandoc/UTF8.hs:141:1-15                            4179           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Highlighting            <entire-module>                                             3258           0    0.0    0.0     0.0    0.0
  highlightingStyles                                         Text.Pandoc.Highlighting            src/Text/Pandoc/Highlighting.hs:(60,1)-(68,24)              3715           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.App.CommandLineOptions  <entire-module>                                             3246           0    1.0    0.0     1.0    0.0
  options                                                    Text.Pandoc.App.CommandLineOptions  src/Text/Pandoc/App/CommandLineOptions.hs:(274,1)-(1142,5)  3632           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.App.Input               <entire-module>                                             3245           0    0.0    0.0     0.0    0.0
  readInput                                                  Text.Pandoc.App.Input               src/Text/Pandoc/App/Input.hs:(49,1)-(77,68)                 3753           0    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.App.Opt                 <entire-module>                                             3244           0    0.0    0.0     0.0    0.0
  defaultOpts                                                Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:(752,1)-(835,5)                  3636           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.App.OutputSettings      <entire-module>                                             3243           0    0.0    0.0     0.0    0.0
  optToOutputSettings                                        Text.Pandoc.App.OutputSettings      src/Text/Pandoc/App/OutputSettings.hs:(63,1)-(276,5)        3679           0    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Class.CommonState       <entire-module>                                             3242           0    0.0    0.0     0.0    0.0
  defaultCommonState                                         Text.Pandoc.Class.CommonState       src/Text/Pandoc/Class/CommonState.hs:(67,1)-(80,3)          3736           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Class.PandocMonad       <entire-module>                                             3241           0    0.0    0.0     0.0    0.0
  toTextM                                                    Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:(427,1)-(441,30)       3744           0    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Class.PandocIO          <entire-module>                                             3240           0    0.0    0.0     0.0    0.0
  fileExists                                                 Text.Pandoc.Class.IO                src/Text/Pandoc/Class/IO.hs:194:1-55                        3737           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Parsing.General         <entire-module>                                             3233           0    0.0    0.0     0.0    0.0
  trimInlinesF                                               Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:151:1-32                 4048           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Parsing.Math            <entire-module>                                             3230           0    0.0    0.0     0.0    0.0
  mathDisplay                                                Text.Pandoc.Parsing.Math            src/Text/Pandoc/Parsing/Math.hs:(79,1)-(84,39)              3960           0    0.0    0.0     0.0    0.0
  mathInline                                                 Text.Pandoc.Parsing.Math            src/Text/Pandoc/Parsing/Math.hs:(88,1)-(93,38)              3969           0    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Parsing.State           <entire-module>                                             3228           0    0.0    0.0     0.0    0.0
  defaultParserState                                         Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:(137,1)-(169,3)            3764           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Parsing.Future          <entire-module>                                             3227           0    0.0    0.0     0.0    0.0
  runF                                                       Text.Pandoc.Parsing.Future          src/Text/Pandoc/Parsing/Future.hs:40:1-29                   4041           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Readers.Metadata        <entire-module>                                             3186           0    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Writers.Markdown.Inline <entire-module>                                             3167           0    0.0    0.0     0.0    0.0
  text                                                       Text.DocLayout                      src/Text/DocLayout.hs:658:1-27                              4199           1    0.0    0.0     0.0    0.0
   literal                                                   Text.DocLayout                      src/Text/DocLayout.hs:(642,1)-(649,20)                      4200           4    0.0    0.0     0.0    0.0
    realLength                                               Text.DocLayout                      src/Text/DocLayout.hs:931:1-36                              4201           4    0.0    0.0     0.0    0.0
     realLengthNarrowContext                                 Text.DocLayout                      src/Text/DocLayout.hs:936:1-63                              4202           4    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.URI                     <entire-module>                                             3160           0    0.0    0.0     0.0    0.0
  skipMany                                                   Data.Attoparsec.Combinator          Data/Attoparsec/Combinator.hs:(220,1)-(221,40)              4005           2    0.0    0.0     0.0    0.0
  endOfInput                                                 Data.Attoparsec.Internal            Data/Attoparsec/Internal.hs:(110,1)-(117,55)                4015           1    0.0    0.0     0.0    0.0
  isBase64DataURI                                            Text.Pandoc.URI                     src/Text/Pandoc/URI.hs:(97,1)-(98,46)                       3993           1    0.0    0.0     0.0    0.0
  charClass                                                  Data.Attoparsec.Text.FastSet        internal/Data/Attoparsec/Text/FastSet.hs:(118,1)-(121,28)   4002           0    0.0    0.0     0.0    0.0
   fromList                                                  Data.Attoparsec.Text.FastSet        internal/Data/Attoparsec/Text/FastSet.hs:(83,1)-(94,29)     4003           2    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Data.BakedIn            <entire-module>                                             3146           0    0.0    0.0     0.0    0.0
  dataFiles                                                  Text.Pandoc.Data.BakedIn            src/Text/Pandoc/Data/BakedIn.hs:(23,1)-(24,62)              3740           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.DocLayout                      <entire-module>                                             2781           0    0.0    0.0     0.0    0.0
  blankline                                                  Text.DocLayout                      src/Text/DocLayout.hs:676:1-24                              4193           1    0.0    0.0     0.0    0.0
  cr                                                         Text.DocLayout                      src/Text/DocLayout.hs:671:1-19                              4194           1    0.0    0.0     0.0    0.0
  empty                                                      Text.DocLayout                      src/Text/DocLayout.hs:192:1-14                              4187           1    0.0    0.0     0.0    0.0
  space                                                      Text.DocLayout                      src/Text/DocLayout.hs:666:1-21                              4210           1    0.0    0.0     0.0    0.0
  vcat                                                       Text.DocLayout                      src/Text/DocLayout.hs:230:1-23                              4189           1    0.0    0.0     0.0    0.0
  vsep                                                       Text.DocLayout                      src/Text/DocLayout.hs:234:1-24                              4191           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.DocLayout.HasChars             <entire-module>                                             2780           0    0.0    0.0     0.0    0.0
 CAF                                                         Text.DocLayout.ANSIFont             <entire-module>                                             2779           0    0.0    0.0     0.0    0.0
  baseFont                                                   Text.DocLayout.ANSIFont             src/Text/DocLayout/ANSIFont.hs:35:1-72                      4211           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.DocLayout.Attributed           <entire-module>                                             2778           0    0.0    0.0     0.0    0.0
  fromList                                                   Text.DocLayout.Attributed           src/Text/DocLayout/Attributed.hs:35:1-34                    4185           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Definition              <entire-module>                                             2367           0    0.0    0.0     0.0    0.0
  nullAttr                                                   Text.Pandoc.Definition              src/Text/Pandoc/Definition.hs:203:1-21                      4022           1    0.0    0.0     0.0    0.0
  nullMeta                                                   Text.Pandoc.Definition              src/Text/Pandoc/Definition.hs:136:1-23                      4045           1    0.0    0.0     0.0    0.0
 CAF                                                         Text.Pandoc.Builder                 <entire-module>                                             2364           0    0.0    0.0     0.0    0.0
  doc                                                        Text.Pandoc.Builder                 src/Text/Pandoc/Builder.hs:275:1-30                         4044           1    0.0    0.0     0.0    0.0
  para                                                       Text.Pandoc.Builder                 src/Text/Pandoc/Builder.hs:451:1-32                         4054           1    0.0    0.0     0.0    0.0
  singleton                                                  Text.Pandoc.Builder                 src/Text/Pandoc/Builder.hs:211:1-32                         4051           1    0.0    0.0     0.0    0.0
  space                                                      Text.Pandoc.Builder                 src/Text/Pandoc/Builder.hs:397:1-23                         4058           1    0.0    0.0     0.0    0.0
  str                                                        Text.Pandoc.Builder                 src/Text/Pandoc/Builder.hs:353:1-21                         4056           1    0.0    0.0     0.0    0.0
  toList                                                     Text.Pandoc.Builder                 src/Text/Pandoc/Builder.hs:208:1-17                         4047           1    0.0    0.0     0.0    0.0
 CAF                                                         Data.Attoparsec.Internal            <entire-module>                                             2346           0    0.0    0.0     0.0    0.0
  demandInput                                                Data.Attoparsec.Internal            Data/Attoparsec/Internal.hs:(73,1)-(78,41)                  4012           1    0.0    0.0     0.0    0.0
 CAF                                                         Data.Attoparsec.Text.Buffer         <entire-module>                                             2337           0    0.0    0.0     0.0    0.0
  lengthCodeUnits                                            Data.Attoparsec.Text.Buffer         internal/Data/Attoparsec/Text/Buffer.hs:158:1-29            3999           1    0.0    0.0     0.0    0.0
 CAF                                                         Data.Attoparsec.Text.FastSet        <entire-module>                                             2336           0    0.0    0.0     0.0    0.0
  charClass                                                  Data.Attoparsec.Text.FastSet        internal/Data/Attoparsec/Text/FastSet.hs:(118,1)-(121,28)   4001           1    0.0    0.0     0.0    0.0
 CAF                                                         Network.URI                         <entire-module>                                             2276           0    0.0    0.0     0.0    0.0
  parseURI                                                   Network.URI                         Network/URI.hs:301:1-26                                     3661           1    0.0    0.0     0.0    0.0
 CAF                                                         System.Directory                    <entire-module>                                             2167           0    0.0    0.0     0.0    0.0
 CAF                                                         System.Directory.Internal.Posix     <entire-module>                                             2164           0    0.0    0.0     0.0    0.0
 CAF                                                         System.FilePath.Posix               <entire-module>                                             2163           0    0.0    0.0     0.0    0.0
 CAF                                                         HsLua.Core.Run                      <entire-module>                                             2107           0    0.0    0.0     0.0    0.0
  run                                                        HsLua.Core.Run                      src/HsLua/Core/Run.hs:41:1-69                               3598           1    0.0    0.0     0.0    0.0
 CAF                                                         HsLua.Core.Types                    <entire-module>                                             2105           0    0.0    0.0     0.0    0.0
  state                                                      HsLua.Core.Types                    src/HsLua/Core/Types.hs:118:1-24                            3606           1    0.0    0.0     0.0    0.0
  toType                                                     HsLua.Core.Types                    src/HsLua/Core/Types.hs:(179,1)-(190,69)                    3619           1    0.0    0.0     0.0    0.0
 CAF                                                         HsLua.Core.Utf8                     <entire-module>                                             2102           0    0.0    0.0     0.0    0.0
  fromString                                                 HsLua.Core.Utf8                     src/HsLua/Core/Utf8.hs:39:1-45                              3615           1    0.0    0.0     0.0    0.0
 CAF                                                         HsLua.Core.Primary                  <entire-module>                                             2100           0    0.0    0.0     0.0    0.0
  close                                                      HsLua.Core.Primary                  src/HsLua/Core/Primary.hs:132:1-17                          3629           1    0.0    0.0     0.0    0.0
  openlibs                                                   HsLua.Core.Primary                  src/HsLua/Core/Primary.hs:516:1-32                          3602           1    0.0    0.0     0.0    0.0
   liftLua                                                   HsLua.Core.Types                    src/HsLua/Core/Types.hs:107:1-32                            3603           1    0.0    0.0     0.0    0.0
 CAF                                                         Data.Text                           <entire-module>                                             2098           0    0.0    0.0     0.0    0.0
 CAF                                                         Data.Text.Array                     <entire-module>                                             2097           0    0.0    0.0     0.0    0.0
 CAF                                                         Data.Text.Internal                  <entire-module>                                             2093           0    0.0    0.0     0.0    0.0
 CAF                                                         Lua                                 <entire-module>                                             2048           0    0.0    0.0     0.0    0.0
  top                                                        Lua                                 src/Lua.hs:336:1-14                                         3627           1    0.0    0.0     0.0    0.0
   nthTop                                                    Lua                                 src/Lua.hs:315:1-26                                         3628           1    0.0    0.0     0.0    0.0
 CAF                                                         Debug.Trace                         <entire-module>                                             1932           0    0.0    0.0     0.0    0.0
 CAF                                                         GHC.Conc.Signal                     <entire-module>                                             1918           0    0.0    0.0     0.0    0.0
 CAF                                                         GHC.IO.Encoding                     <entire-module>                                             1900           0    0.0    0.0     0.0    0.0
 CAF                                                         GHC.IO.Encoding.Iconv               <entire-module>                                             1898           0    0.0    0.0     0.0    0.0
 CAF                                                         GHC.IO.Exception                    <entire-module>                                             1892           0    0.0    0.0     0.0    0.0
 CAF                                                         GHC.IO.FD                           <entire-module>                                             1891           0    0.0    0.0     0.0    0.0
 CAF                                                         GHC.IO.Handle.FD                    <entire-module>                                             1889           0    0.0    0.0     0.0    0.0
 CAF                                                         GHC.Event.Thread                    <entire-module>                                             1818           0    0.0    0.0     0.0    0.0
 main                                                        Main                                src/pandoc.hs:(48,1)-(68,53)                                3595           0    0.0    0.0    99.0   99.9
  convertWithOpts                                            Text.Pandoc.App                     src/Text/Pandoc/App.hs:(79,1)-(128,52)                      3634           1    0.0    0.0    99.0   99.9
   optDataDir                                                Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:158:7-16                         3635           1    0.0    0.0     0.0    0.0
   optDumpArgs                                               Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:141:7-17                         3639           1    0.0    0.0     0.0    0.0
   optEol                                                    Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:180:7-12                         4181           1    0.0    0.0     0.0    0.0
   optFailIfWarnings                                         Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:146:7-23                         4176           1    0.0    0.0     0.0    0.0
   optFilters                                                Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:154:7-16                         3746           1    0.0    0.0     0.0    0.0
   optIgnoreArgs                                             Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:142:7-19                         3660           1    0.0    0.0     0.0    0.0
   optInputFiles                                             Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:118:7-19                         3658           1    0.0    0.0     0.0    0.0
   optLogFile                                                Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:145:7-16                         4175           1    0.0    0.0     0.0    0.0
   optOutputFile                                             Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:117:7-19                         4177           1    0.0    0.0     0.0    0.0
   runIO                                                     Text.Pandoc.Class.PandocIO          src/Text/Pandoc/Class/PandocIO.hs:36:1-59                   3640           1    0.0    0.0    99.0   99.9
    optExtractMedia                                          Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:168:7-21                         4035           2    0.0    0.0     0.0    0.0
    optMetadata                                              Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:115:7-17                         3651           2    0.0    0.0     0.0    0.0
    optSandbox                                               Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:185:7-16                         3664           2    0.0    0.0     0.0    0.0
    outputPdfProgram                                         Text.Pandoc.App.OutputSettings      src/Text/Pandoc/App/OutputSettings.hs:57:5-20               3723           2    0.0    0.0     0.0    0.0
    applyFilters                                             Text.Pandoc.Filter                  src/Text/Pandoc/Filter.hs:(83,1)-(101,59)                   4033           1    0.0    0.0     0.0    0.0
    applyTransforms                                          Text.Pandoc.Transforms              src/Text/Pandoc/Transforms.hs:38:1-62                       4034           1    0.0    0.0     0.0    0.0
    extensionEnabled                                         Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      4040           1    0.0    0.0     0.0    0.0
    getLog                                                   Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:168:1-42               4174           1    0.0    0.0     0.0    0.0
    getReader                                                Text.Pandoc.Readers                 src/Text/Pandoc/Readers.hs:(175,1)-(180,78)                 3665           1    0.0    0.0     0.0    0.0
     applyExtensionsDiff                                     Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:(105,1)-(112,69)                  3669           1    0.0    0.0     0.0    0.0
      disableExtensions                                      Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:(208,1)-(210,30)              3670           2    0.0    0.0     0.0    0.0
      extsToDisable                                          Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:56:5-17                           3672           2    0.0    0.0     0.0    0.0
      extsToEnable                                           Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:55:5-16                           3671           2    0.0    0.0     0.0    0.0
      extensionsToList                                       Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:190:1-63                      3673           1    0.0    0.0     0.0    0.0
      extsDefault                                            Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:79:5-15                           3769           1    0.0    0.0     0.0    0.0
     formatName                                              Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:48:5-14                           3667           1    0.0    0.0     0.0    0.0
     getExtensionsConfig                                     Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:(85,1)-(88,3)                     3770           1    0.0    0.0     0.0    0.0
      getDefaultExtensions                                   Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:(357,1)-(478,64)              3771           1    0.0    0.0     0.0    0.0
     readers                                                 Text.Pandoc.Readers                 src/Text/Pandoc/Readers.hs:(126,1)-(171,11)                 3666           1    0.0    0.0     0.0    0.0
    lookupMetaString                                         Text.Pandoc.Writers.Shared          src/Text/Pandoc/Writers/Shared.hs:(435,1)-(441,37)          3652           1    0.0    0.0     0.0    0.0
     lookupMeta                                              Text.Pandoc.Definition              src/Text/Pandoc/Definition.hs:145:1-40                      3653           1    0.0    0.0     0.0    0.0
    optAbbreviations                                         Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:131:7-22                         3725           1    0.0    0.0     0.0    0.0
    optBibliography                                          Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:183:7-21                         4062           1    0.0    0.0     0.0    0.0
    optCSL                                                   Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:182:7-12                         4063           1    0.0    0.0     0.0    0.0
    optCitationAbbreviations                                 Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:184:7-30                         4061           1    0.0    0.0     0.0    0.0
    optEmbedResources                                        Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:124:7-23                         4173           1    0.0    0.0     0.0    0.0
    optFileScope                                             Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:170:7-18                         3755           1    0.0    0.0     0.0    0.0
    optFrom                                                  Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:107:7-13                         3655           1    0.0    0.0     0.0    0.0
    optMetadataFiles                                         Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:116:7-22                         3745           1    0.0    0.0     0.0    0.0
    optPreserveTabs                                          Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:105:7-21                         3783           1    0.0    0.0     0.0    0.0
    optRequestHeaders                                        Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:178:7-23                         3649           1    0.0    0.0     0.0    0.0
    optSelfContained                                         Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:123:7-22                         4172           1    0.0    0.0     0.0    0.0
    optShiftHeadingLevelBy                                   Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:112:7-28                         4039           1    0.0    0.0     0.0    0.0
    optTabStop                                               Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:104:7-16                         3784           1    0.0    0.0     0.0    0.0
    optToOutputSettings                                      Text.Pandoc.App.OutputSettings      src/Text/Pandoc/App/OutputSettings.hs:(63,1)-(276,5)        3674           1    1.0    0.0     4.1    1.4
     optTo                                                   Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:108:7-11                         3692           2    0.0    0.0     0.0    0.0
     getWriter                                               Text.Pandoc.Writers                 src/Text/Pandoc/Writers.hs:(210,1)-(215,78)                 3696           1    0.0    0.0     3.1    1.4
      applyExtensionsDiff                                    Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:(105,1)-(112,69)                  3700           1    0.0    0.0     0.0    0.0
       disableExtensions                                     Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:(208,1)-(210,30)              3701           2    0.0    0.0     0.0    0.0
       extsToDisable                                         Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:56:5-17                           3703           2    0.0    0.0     0.0    0.0
       extsToEnable                                          Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:55:5-16                           3702           2    0.0    0.0     0.0    0.0
       extensionsToList                                      Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:190:1-63                      3704           1    0.0    0.0     0.0    0.0
       extsDefault                                           Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:79:5-15                           4070           1    0.0    0.0     0.0    0.0
      formatName                                             Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:48:5-14                           3698           1    0.0    0.0     0.0    0.0
      getExtensionsConfig                                    Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:(85,1)-(88,3)                     4071           1    0.0    0.0     0.0    0.0
       getDefaultExtensions                                  Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:(357,1)-(478,64)              4072           1    0.0    0.0     0.0    0.0
      writers                                                Text.Pandoc.Writers                 src/Text/Pandoc/Writers.hs:(139,1)-(206,3)                  3697           1    0.0    0.0     3.1    1.4
       writeMarkdown                                         Text.Pandoc.Writers.Markdown        src/Text/Pandoc/Writers/Markdown.hs:(61,1)-(66,30)          4037           1    0.0    0.0     3.1    1.4
        evalMD                                               Text.Pandoc.Writers.Markdown.Types  src/Text/Pandoc/Writers/Markdown/Types.hs:37:1-52           4038           1    0.0    0.0     3.1    1.4
         writerReferenceLocation                             Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:344:5-27                         4131           5    0.0    0.0     0.0    0.0
         inlineListToMarkdown                                Text.Pandoc.Writers.Markdown.Inline src/Text/Pandoc/Writers/Markdown/Inline.hs:(263,1)-(313,30) 4074           4    0.0    0.0     2.1    1.3
          isEnabled                                          Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:400:1-62                         4133           7    0.0    0.0     0.0    0.0
           extensionEnabled                                  Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      4135           7    0.0    0.0     0.0    0.0
           writerExtensions                                  Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:319:5-20                         4134           7    0.0    0.0     0.0    0.0
          envVariant                                         Text.Pandoc.Writers.Markdown.Types  src/Text/Pandoc/Writers/Markdown/Types.hs:40:30-39          4138           5    0.0    0.0     0.0    0.0
          literal                                            Text.DocLayout                      src/Text/DocLayout.hs:(642,1)-(649,20)                      4203           4    1.0    0.0     1.0    1.3
           realLength                                        Text.DocLayout                      src/Text/DocLayout.hs:931:1-36                              4204           3    0.0    0.0     0.0    1.3
            realLengthNarrowContext                          Text.DocLayout                      src/Text/DocLayout.hs:936:1-63                              4205           3    0.0    1.3     0.0    1.3
          unsmartify                                         Text.Pandoc.Writers.Shared          src/Text/Pandoc/Writers/Shared.hs:(269,1)-(281,26)          4208           3    0.0    0.0     0.0    0.0
          writerPreferAscii                                  Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:348:5-21                         4206           3    0.0    0.0     0.0    0.0
          envEscapeSpaces                                    Text.Pandoc.Writers.Markdown.Types  src/Text/Pandoc/Writers/Markdown/Types.hs:43:30-44          4209           1    0.0    0.0     0.0    0.0
          escapeURI                                          Text.Pandoc.URI                     src/Text/Pandoc/URI.hs:(35,1)-(38,65)                       4161           1    0.0    0.0     0.0    0.0
           escapeURIString                                   Network.URI                         Network/URI.hs:1043:1-51                                    4168           1    0.0    0.0     0.0    0.0
           isBase64DataURI                                   Text.Pandoc.URI                     src/Text/Pandoc/URI.hs:(97,1)-(98,46)                       4162           0    0.0    0.0     0.0    0.0
            runParser                                        Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:111:7-15                  4163           4    0.0    0.0     0.0    0.0
            buffer                                           Data.Attoparsec.Text.Buffer         internal/Data/Attoparsec/Text/Buffer.hs:79:1-49             4165           1    0.0    0.0     0.0    0.0
            demandInput_                                     Data.Attoparsec.Internal            Data/Attoparsec/Internal.hs:(85,1)-(91,48)                  4167           1    0.0    0.0     0.0    0.0
            fromPos                                          Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:46:21-27                  4166           1    0.0    0.0     0.0    0.0
            unbufferAt                                       Data.Attoparsec.Text.Buffer         internal/Data/Attoparsec/Text/Buffer.hs:(85,1)-(87,26)      4164           1    0.0    0.0     0.0    0.0
          isURI                                              Text.Pandoc.URI                     src/Text/Pandoc/URI.hs:(125,1)-(131,59)                     4143           1    0.0    0.0     1.0    0.0
           isBase64DataURI                                   Text.Pandoc.URI                     src/Text/Pandoc/URI.hs:(97,1)-(98,46)                       4144           0    0.0    0.0     1.0    0.0
            runParser                                        Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:111:7-15                  4145          49    0.0    0.0     0.0    0.0
            member                                           Data.Attoparsec.Text.FastSet        internal/Data/Attoparsec/Text/FastSet.hs:(109,1)-(115,52)   4150          10    0.0    0.0     0.0    0.0
            fromPos                                          Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:46:21-27                  4148           5    0.0    0.0     0.0    0.0
            buffer                                           Data.Attoparsec.Text.Buffer         internal/Data/Attoparsec/Text/Buffer.hs:79:1-49             4147           1    0.0    0.0     0.0    0.0
            unbufferAt                                       Data.Attoparsec.Text.Buffer         internal/Data/Attoparsec/Text/Buffer.hs:(85,1)-(87,26)      4146           1    0.0    0.0     0.0    0.0
            lengthCodeUnits                                  Data.Attoparsec.Text.Buffer         internal/Data/Attoparsec/Text/Buffer.hs:158:1-29            4149           0    0.0    0.0     0.0    0.0
            skipMany                                         Data.Attoparsec.Combinator          Data/Attoparsec/Combinator.hs:(220,1)-(221,40)              4151           0    1.0    0.0     1.0    0.0
             member                                          Data.Attoparsec.Text.FastSet        internal/Data/Attoparsec/Text/FastSet.hs:(109,1)-(115,52)   4154      104823    0.0    0.0     0.0    0.0
             runParser                                       Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:111:7-15                  4152          54    0.0    0.0     0.0    0.0
             fromPos                                         Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:46:21-27                  4153           7    0.0    0.0     0.0    0.0
             unbufferAt                                      Data.Attoparsec.Text.Buffer         internal/Data/Attoparsec/Text/Buffer.hs:(85,1)-(87,26)      4155           1    0.0    0.0     0.0    0.0
             demandInput                                     Data.Attoparsec.Internal            Data/Attoparsec/Internal.hs:(73,1)-(78,41)                  4157           0    0.0    0.0     0.0    0.0
              runParser                                      Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:111:7-15                  4158           3    0.0    0.0     0.0    0.0
              endOfInput                                     Data.Attoparsec.Internal            Data/Attoparsec/Internal.hs:(110,1)-(117,55)                4159           0    0.0    0.0     0.0    0.0
               runParser                                     Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:111:7-15                  4160           1    0.0    0.0     0.0    0.0
             lengthCodeUnits                                 Data.Attoparsec.Text.Buffer         internal/Data/Attoparsec/Text/Buffer.hs:158:1-29            4156           0    0.0    0.0     0.0    0.0
          linkAttributes                                     Text.Pandoc.Writers.Markdown.Inline src/Text/Pandoc/Writers/Markdown/Inline.hs:(184,1)-(188,15) 4195           1    0.0    0.0     0.0    0.0
           isEnabled                                         Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:400:1-62                         4196           1    0.0    0.0     0.0    0.0
            extensionEnabled                                 Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      4198           1    0.0    0.0     0.0    0.0
            writerExtensions                                 Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:319:5-20                         4197           1    0.0    0.0     0.0    0.0
          stringify                                          Text.Pandoc.Shared                  src/Text/Pandoc/Shared.hs:(362,1)-(378,24)                  4139           1    0.0    0.0     0.0    0.0
           queryInline                                       Text.Pandoc.Walk                    src/Text/Pandoc/Walk.hs:(445,1)-(464,42)                    4142           1    0.0    0.0     0.0    0.0
           walkInlineM                                       Text.Pandoc.Walk                    src/Text/Pandoc/Walk.hs:(419,1)-(438,41)                    4141           1    0.0    0.0     0.0    0.0
          writerReferenceLinks                               Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:320:5-24                         4136           1    0.0    0.0     0.0    0.0
         envVariant                                          Text.Pandoc.Writers.Markdown.Types  src/Text/Pandoc/Writers/Markdown/Types.hs:40:30-39          4075           2    0.0    0.0     0.0    0.0
         isEmpty                                             Text.DocLayout                      src/Text/DocLayout.hs:(187,1)-(188,21)                      4188           2    0.0    0.0     0.0    0.0
         isEnabled                                           Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:400:1-62                         4068           1    0.0    0.0     0.0    0.0
          extensionEnabled                                   Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      4073           1    0.0    0.0     0.0    0.0
          writerExtensions                                   Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:319:5-20                         4069           1    0.0    0.0     0.0    0.0
         metaToContext'                                      Text.Pandoc.Writers.Shared          src/Text/Pandoc/Writers/Shared.hs:(108,1)-(109,68)          4064           1    0.0    0.0     0.0    0.0
         render                                              Text.DocLayout                      src/Text/DocLayout.hs:364:1-20                              4183           1    0.0    0.0     1.0    0.1
          renderPlain                                        Text.DocLayout                      src/Text/DocLayout.hs:(378,1)-(379,41)                      4184           1    1.0    0.1     1.0    0.1
         stNoteNum                                           Text.Pandoc.Writers.Markdown.Types  src/Text/Pandoc/Writers/Markdown/Types.hs:68:34-42          4169           1    0.0    0.0     0.0    0.0
         stNotes                                             Text.Pandoc.Writers.Markdown.Types  src/Text/Pandoc/Writers/Markdown/Types.hs:61:34-40          4170           1    0.0    0.0     0.0    0.0
         stRefs                                              Text.Pandoc.Writers.Markdown.Types  src/Text/Pandoc/Writers/Markdown/Types.hs:63:34-39          4171           1    0.0    0.0     0.0    0.0
         writerColumns                                       Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:323:5-17                         4218           1    0.0    0.0     0.0    0.0
         writerTableOfContents                               Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:311:5-25                         4065           1    0.0    0.0     0.0    0.0
         writerTemplate                                      Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:308:5-18                         4186           1    0.0    0.0     0.0    0.0
         writerWrapText                                      Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:322:5-18                         4212           1    0.0    0.0     0.0    0.0
         anyOrderedListMarker                                Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(159,1)-(162,75)           4077           0    0.0    0.0     0.0    0.0
          char                                               Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:175:1-23                         4086           2    0.0    0.0     0.0    0.0
           satisfy                                           Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 4087           2    0.0    0.0     0.0    0.0
            decimal                                          Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(104,1)-(106,55)           4088           0    0.0    0.0     0.0    0.0
             digit                                           Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:203:1-23                         4089           0    0.0    0.0     0.0    0.0
            lowerAlpha                                       Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(142,1)-(144,43)           4130           0    0.0    0.0     0.0    0.0
            lowerRoman                                       Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(98,1)-(100,26)            4128           0    0.0    0.0     0.0    0.0
             romanNumeral                                    Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(60,1)-(88,24)             4129           0    0.0    0.0     0.0    0.0
            upperAlpha                                       Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(148,1)-(150,43)           4127           0    0.0    0.0     0.0    0.0
            upperRoman                                       Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(92,1)-(94,26)             4125           0    0.0    0.0     0.0    0.0
             romanNumeral                                    Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(60,1)-(88,24)             4126           0    0.0    0.0     0.0    0.0
          decimal                                            Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(104,1)-(106,55)           4079           0    0.0    0.0     0.0    0.0
           digit                                             Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:203:1-23                         4082           0    0.0    0.0     0.0    0.0
            satisfy                                          Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 4083           0    0.0    0.0     0.0    0.0
             upperRoman                                      Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(92,1)-(94,26)             4122           0    0.0    0.0     0.0    0.0
              romanNumeral                                   Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(60,1)-(88,24)             4123           0    0.0    0.0     0.0    0.0
               char                                          Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:175:1-23                         4124           0    0.0    0.0     0.0    0.0
          lowerAlpha                                         Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(142,1)-(144,43)           4093           0    0.0    0.0     0.0    0.0
           satisfy                                           Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 4095           0    0.0    0.0     0.0    0.0
            char                                             Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:175:1-23                         4096           0    0.0    0.0     0.0    0.0
          lowerRoman                                         Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(98,1)-(100,26)            4098           0    0.0    0.0     0.0    0.0
           romanNumeral                                      Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(60,1)-(88,24)             4100           0    0.0    0.0     0.0    0.0
            char                                             Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:175:1-23                         4103           0    0.0    0.0     0.0    0.0
             satisfy                                         Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 4104           0    0.0    0.0     0.0    0.0
              lowerAlpha                                     Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(142,1)-(144,43)           4105           0    0.0    0.0     0.0    0.0
          upperAlpha                                         Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(148,1)-(150,43)           4107           0    0.0    0.0     0.0    0.0
           satisfy                                           Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 4109           0    0.0    0.0     0.0    0.0
            lowerRoman                                       Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(98,1)-(100,26)            4110           0    0.0    0.0     0.0    0.0
             romanNumeral                                    Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(60,1)-(88,24)             4111           0    0.0    0.0     0.0    0.0
              char                                           Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:175:1-23                         4112           0    0.0    0.0     0.0    0.0
          upperRoman                                         Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(92,1)-(94,26)             4114           0    0.0    0.0     0.0    0.0
           romanNumeral                                      Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(60,1)-(88,24)             4116           0    0.0    0.0     0.0    0.0
            char                                             Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:175:1-23                         4119           0    0.0    0.0     0.0    0.0
             satisfy                                         Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 4120           0    0.0    0.0     0.0    0.0
              upperAlpha                                     Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(148,1)-(150,43)           4121           0    0.0    0.0     0.0    0.0
        isEnabled                                            Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:400:1-62                         4213           1    0.0    0.0     0.0    0.0
         extensionEnabled                                    Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      4215           1    0.0    0.0     0.0    0.0
         writerExtensions                                    Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:319:5-20                         4214           1    0.0    0.0     0.0    0.0
        writerWrapText                                       Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:322:5-18                         4216           1    0.0    0.0     0.0    0.0
     lookupHighlightingStyle                                 Text.Pandoc.Highlighting            src/Text/Pandoc/Highlighting.hs:(237,1)-(248,53)            3714           1    0.0    0.0     0.0    0.0
     optAscii                                                Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:166:7-14                         4207           1    0.0    0.0     0.0    0.0
     optColumns                                              Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:153:7-16                         4219           1    0.0    0.0     0.0    0.0
     optCss                                                  Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:172:7-12                         3720           1    0.0    0.0     0.0    0.0
     optDumpArgs                                             Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:141:7-17                         3675           1    0.0    0.0     0.0    0.0
     optEpubCoverImage                                       Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:138:7-23                         3722           1    0.0    0.0     0.0    0.0
     optEpubMetadata                                         Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:136:7-21                         3677           1    0.0    0.0     0.0    0.0
     optHighlightStyle                                       Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:127:7-23                         3713           1    0.0    0.0     0.0    0.0
     optIncludeAfterBody                                     Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:175:7-25                         3718           1    0.0    0.0     0.0    0.0
     optIncludeBeforeBody                                    Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:174:7-26                         3717           1    0.0    0.0     0.0    0.0
     optIncludeInHeader                                      Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:176:7-24                         3719           1    0.0    0.0     0.0    0.0
     optInputFiles                                           Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:118:7-19                         3716           1    0.0    0.0     0.0    0.0
     optOutputFile                                           Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:117:7-19                         3691           1    0.0    0.0     0.0    0.0
     optReferenceLinks                                       Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:147:7-23                         4137           1    0.0    0.0     0.0    0.0
     optReferenceLocation                                    Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:148:7-26                         4132           1    0.0    0.0     0.0    0.0
     optSandbox                                              Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:185:7-16                         3695           1    0.0    0.0     0.0    0.0
     optStandalone                                           Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:106:7-19                         3705           1    0.0    0.0     0.0    0.0
     optSyntaxDefinitions                                    Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:128:7-26                         3712           1    0.0    0.0     0.0    0.0
     optTableOfContents                                      Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:109:7-24                         4067           1    0.0    0.0     0.0    0.0
     optTitlePrefix                                          Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:171:7-20                         3721           1    0.0    0.0     0.0    0.0
     optWrap                                                 Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:152:7-13                         4217           1    0.0    0.0     0.0    0.0
     formatFromFilePaths                                     Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:169:1-51                          3693           0    0.0    0.0     0.0    0.0
      parseURI                                               Network.URI                         Network/URI.hs:301:1-26                                     3694           0    0.0    0.0     0.0    0.0
     parseFlavoredFormat                                     Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:(120,1)-(141,55)                  3690           0    0.0    0.0     0.0    0.0
    optTrace                                                 Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:144:7-14                         3791           1    0.0    0.0     0.0    0.0
    outputFormat                                             Text.Pandoc.App.OutputSettings      src/Text/Pandoc/App/OutputSettings.hs:54:5-16               3724           1    0.0    0.0     0.0    0.0
    outputWriter                                             Text.Pandoc.App.OutputSettings      src/Text/Pandoc/App/OutputSettings.hs:55:5-16               4036           1    0.0    0.0     0.0    0.0
    outputWriterOptions                                      Text.Pandoc.App.OutputSettings      src/Text/Pandoc/App/OutputSettings.hs:56:5-23               4066           1    0.0    0.0     0.0    0.0
    readInput                                                Text.Pandoc.App.Input               src/Text/Pandoc/App/Input.hs:(49,1)-(77,68)                 3747           1    0.0    0.1    94.8   98.5
     inputFileScope                                          Text.Pandoc.App.Input               src/Text/Pandoc/App/Input.hs:44:5-18                        3754           1    0.0    0.0     0.0    0.0
     inputReader                                             Text.Pandoc.App.Input               src/Text/Pandoc/App/Input.hs:39:5-15                        3751           1    0.0    0.0     0.0    0.0
     inputReaderName                                         Text.Pandoc.App.Input               src/Text/Pandoc/App/Input.hs:40:5-19                        3752           1    0.0    0.0     0.0    0.0
     inputReaderOptions                                      Text.Pandoc.App.Input               src/Text/Pandoc/App/Input.hs:41:5-22                        3768           1    0.0    0.0     0.0    0.0
     inputSources                                            Text.Pandoc.App.Input               src/Text/Pandoc/App/Input.hs:42:5-16                        3748           1    0.0    0.0     0.0    0.0
     inputSpacesPerTab                                       Text.Pandoc.App.Input               src/Text/Pandoc/App/Input.hs:43:5-21                        3782           1    0.0    0.0     0.0    0.0
     readFileStrict                                          Text.Pandoc.Class.IO                src/Text/Pandoc/Class/IO.hs:180:1-43                        3750           1    1.0    0.0     1.0    0.0
     tabFilter                                               Text.Pandoc.Shared                  src/Text/Pandoc/Shared.hs:(257,1)-(265,42)                  3785           1    1.0    0.0     1.0    0.0
     toTextM                                                 Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:(427,1)-(441,30)       3756           1    0.0    0.0     0.0    0.0
     getReader                                               Text.Pandoc.Readers                 src/Text/Pandoc/Readers.hs:(175,1)-(180,78)                 3757           0    0.0    0.0    92.8   98.3
      readers                                                Text.Pandoc.Readers                 src/Text/Pandoc/Readers.hs:(126,1)-(171,11)                 3758           0    0.0    0.0    92.8   98.3
       readMarkdown                                          Text.Pandoc.Readers.Markdown        src/Text/Pandoc/Readers/Markdown.hs:(68,1)-(73,32)          3759           1    0.0    0.0    92.8   98.3
        guardEnabled                                         Text.Pandoc.Parsing.Capabilities    src/Text/Pandoc/Parsing/Capabilities.hs:(112,1)-(113,61)    3762           2    0.0    0.0     0.0    0.0
        char                                                 Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:175:1-23                         3776           1    0.0    0.0     0.0    0.0
         satisfy                                             Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 3777           1    0.0    0.0     0.0    0.0
        ensureFinalNewlines                                  Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(99,1)-(109,76)                  3781           1    0.0    0.0     0.0    0.0
        readWithM                                            Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(621,1)-(625,28)         3760           1    0.0    0.0    91.8   97.5
         runParserT                                          Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:623:36-94                3761           1    0.0    0.0    91.8   97.5
          guardEnabled                                       Text.Pandoc.Parsing.Capabilities    src/Text/Pandoc/Parsing/Capabilities.hs:(112,1)-(113,61)    3763          60    0.0    0.0    91.8   97.5
           char                                              Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:175:1-23                         3778      105054    2.1    1.5    91.8   97.5
            satisfy                                          Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(157,1)-(159,46)                 3779      209988   15.5   19.2    89.7   96.0
             the_blocks                                      Text.Pandoc.Readers.Markdown        src/Text/Pandoc/Readers/Markdown.hs:319:38-48               3789           0    1.0    0.0    74.2   76.8
              spaceChar                                      Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:323:1-49                 3803           9    0.0    0.0     0.0    0.0
              string                                         Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3823           5    0.0    0.0     0.0    0.0
              blanklines                                     Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:350:1-39                 3793           4    0.0    0.0    73.2   76.8
               blankline                                     Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:345:1-39                 3794           9    0.0    0.0    73.2   76.8
                skipSpaces                                   Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:340:1-31                 3795          15    0.0    0.0    73.2   76.8
                 gobbleAtMostSpaces                          Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(383,1)-(388,42)         3799          34    0.0    0.0    73.2   76.8
                  stateOptions                               Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3807           5    0.0    0.0     0.0    0.0
                  extensionEnabled                           Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      3805           4    0.0    0.0     0.0    0.0
                  notFollowedBy'                             Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(274,1)-(277,52)         3816           4    0.0    0.0    73.2   76.8
                   tableWith'                                Text.Pandoc.Parsing.GridTable       src/Text/Pandoc/Parsing/GridTable.hs:(210,1)-(218,69)       3833          16    0.0    0.0    73.2   76.8
                    anyLine                                  Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(169,1)-(188,28)         3839           5    1.0    0.0    73.2   76.8
                     stateOptions                            Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3841           4    0.0    0.0     0.0    0.0
                     gridTableWith'                          Text.Pandoc.Parsing.GridTable       src/Text/Pandoc/Parsing/GridTable.hs:(117,1)-(159,74)       3846           3    0.0    0.0    72.2   76.8
                      gridTable                              Text.GridTable.Parse                src/Text/GridTable/Parse.hs:(26,1)-(34,24)                  3848           3    1.0    0.0    72.2   76.8
                       stateOptions                          Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3850           3    0.0    0.0     0.0    0.0
                       extensionEnabled                      Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      3857           2    0.0    0.0     0.0    0.0
                       readerExtensions                      Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         3858           2    0.0    0.0     0.0    0.0
                       countChar                             Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:158:1-35                 3849           1    0.0    0.0     0.0    0.0
                       lineBlockLines                        Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(609,1)-(612,15)         3862           1    0.0    0.0    71.1   76.8
                        guardDisabled                        Text.Pandoc.Parsing.Capabilities    src/Text/Pandoc/Parsing/Capabilities.hs:(118,1)-(119,67)    3869           3    0.0    0.0    71.1   76.8
                         anyOrderedListMarker                Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(159,1)-(162,75)           3873           2    0.0    0.0    71.1   76.8
                          decimal                            Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(104,1)-(106,55)           3874           2    0.0    0.0     0.0    0.0
                           digit                             Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:203:1-23                         3875           2    0.0    0.0     0.0    0.0
                          lowerAlpha                         Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(142,1)-(144,43)           3876           2    0.0    0.0     0.0    0.0
                          lowerRoman                         Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(98,1)-(100,26)            3877           2    0.0    0.0    71.1   76.8
                           romanNumeral                      Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(60,1)-(88,24)             3878           2    0.0    0.0    71.1   76.8
                            stateOptions                     Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3894          16    0.0    0.0     0.0    0.0
                            extensionEnabled                 Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      3892           8    0.0    0.0     0.0    0.0
                            readerExtensions                 Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         3893           8    0.0    0.0     0.0    0.0
                            readerTabStop                    Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:62:10-22                         3895           8    0.0    0.0     0.0    0.0
                            spaceChar                        Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:323:1-49                 3896           4    0.0    0.0     0.0    0.0
                            citeKey                          Text.Pandoc.Parsing.Citations       src/Text/Pandoc/Parsing/Citations.hs:(38,1)-(47,31)         3901           1    0.0    0.0    71.1   76.8
                             alphaNum                        Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:199:1-29                         3912           2    0.0    0.0     0.0    0.0
                             extensionEnabled                Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      3907           2    0.0    0.0     0.0    0.0
                             readerExtensions                Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         3908           2    0.0    0.0     0.0    0.0
                             stateOptions                    Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3909           2    0.0    0.0     0.0    0.0
                             notAfterString                  Text.Pandoc.Parsing.Capabilities    src/Text/Pandoc/Parsing/Capabilities.hs:(128,1)-(131,39)    3903           1    0.0    0.0     0.0    0.0
                              stateLastStrPos                Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:49:5-19                    3904           1    0.0    0.0     0.0    0.0
                             anyChar                         Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:171:1-30                         3911           0    0.0    0.0     0.0    0.0
                             str                             Text.Pandoc.Builder                 src/Text/Pandoc/Builder.hs:353:1-21                         4059           0    0.0    0.0     0.0    0.0
                             updateLastStrPos                Text.Pandoc.Parsing.Capabilities    src/Text/Pandoc/Parsing/Capabilities.hs:124:1-69            3915           0   14.4    9.4    71.1   76.8
                              stateOptions                   Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3918          51    0.0    0.0     0.0    0.0
                              readerExtensions               Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         3917          31    0.0    0.0     0.0    0.0
                              extensionEnabled               Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      3916          30    0.0    0.0     0.0    0.0
                              spaceChar                      Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:323:1-49                 3921          19    0.0    0.0     0.0    0.0
                              readerTabStop                  Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:62:10-22                         3928          18    0.0    0.0     0.0    0.0
                              string                         Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3932           7    0.0    0.0     0.0    0.0
                              newline                        Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:183:1-27                         3923           4    0.0    0.0     0.0    0.0
                              alphaNum                       Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:199:1-29                         3922           3    0.0    0.0     0.0    0.0
                              htmlTag                        Text.Pandoc.Readers.HTML            src/Text/Pandoc/Readers/HTML.hs:(1151,1)-(1216,17)          3931           3    0.0    0.0     0.0    0.0
                              withRaw                        Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(554,1)-(559,48)         3947           3    0.0    0.0     0.0    0.0
                              htmlInBalanced                 Text.Pandoc.Readers.HTML            src/Text/Pandoc/Readers/HTML.hs:(1102,1)-(1127,14)          3934           2    0.0    0.0     0.0    0.0
                              oneOf                          Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:163:1-30                         3933           2    0.0    0.0     0.0    0.0
                              readerAbbreviations            Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:65:10-28                         3919           2    0.0    0.0     0.0    0.0
                              anyChar                        Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:171:1-30                         3920           1    0.0    0.0     0.0    0.0
                              countChar                      Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:158:1-35                 3935           1    0.0    0.0     0.0    0.0
                              noneOf                         Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:167:1-34                         3925           1    0.0    0.0     0.0    0.0
                              rawLaTeXBlock                  Text.Pandoc.Readers.LaTeX           src/Text/Pandoc/Readers/LaTeX.hs:(141,1)-(154,60)           3938           1    0.0    0.0     0.0    0.0
                              stTrace                        Text.Pandoc.Class.CommonState       src/Text/Pandoc/Class/CommonState.hs:55:5-11                3927           1    0.0    0.0     0.0    0.0
                              stateInNote                    Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:56:5-15                    3944           1    0.0    0.0     0.0    0.0
                              textStr                        Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:163:1-36                 3936           1    0.0    0.0     0.0    0.0
                               string                        Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3937           1    0.0    0.0     0.0    0.0
                              yamlMetaBlock                  Text.Pandoc.Readers.Metadata        src/Text/Pandoc/Readers/Metadata.hs:(168,1)-(181,10)        3929           1    0.0    0.0     0.0    0.0
                               string                        Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3930           1    0.0    0.0     0.0    0.0
                              decimal                        Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(104,1)-(106,55)           3939           0    0.0    0.0     0.0    0.0
                               digit                         Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:203:1-23                         3940           0    0.0    0.0     0.0    0.0
                              lowerAlpha                     Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(142,1)-(144,43)           3941           0    0.0    0.0     0.0    0.0
                              notAfterString                 Text.Pandoc.Parsing.Capabilities    src/Text/Pandoc/Parsing/Capabilities.hs:(128,1)-(131,39)    3945           0    0.0    0.0    56.7   67.4
                               extensionEnabled              Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      3949           5    0.0    0.0     0.0    0.0
                               readerExtensions              Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         3950           5    0.0    0.0     0.0    0.0
                               stateOptions                  Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3951           5    0.0    0.0     0.0    0.0
                               stateLastStrPos               Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:49:5-19                    3946           1    0.0    0.0     0.0    0.0
                               withRaw                       Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(554,1)-(559,48)         3948           1    0.0    0.0    56.7   67.4
                                <+?>                         Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:683:1-62                 3961           1    0.0    0.0     0.0    0.0
                                mathDisplay                  Text.Pandoc.Parsing.Math            src/Text/Pandoc/Parsing/Math.hs:(79,1)-(84,39)              3954           1    0.0    0.0    56.7   67.4
                                 extensionEnabled            Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      3955           3    0.0    0.0     0.0    0.0
                                 readerExtensions            Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         3956           3    0.0    0.0     0.0    0.0
                                 stateOptions                Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3957           3    0.0    0.0     0.0    0.0
                                 textStr                     Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:163:1-36                 3958           1    0.0    0.0     0.0    0.0
                                  string                     Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3959           1    0.0    0.0     0.0    0.0
                                 <+?>                        Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:683:1-62                 3962           0    0.0    0.0    56.7   67.4
                                  mathInline                 Text.Pandoc.Parsing.Math            src/Text/Pandoc/Parsing/Math.hs:(88,1)-(93,38)              3963           1    0.0    0.0    56.7   67.4
                                   extensionEnabled          Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      3964           6    0.0    0.0     0.0    0.0
                                   readerExtensions          Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         3965           6    0.0    0.0     0.0    0.0
                                   stateOptions              Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3966           6    0.0    0.0     0.0    0.0
                                   htmlTag                   Text.Pandoc.Readers.HTML            src/Text/Pandoc/Readers/HTML.hs:(1151,1)-(1216,17)          3972           1    0.0    0.0     0.0    0.0
                                   parseFromString           Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(418,1)-(426,15)         3978           1   55.7   62.2    56.7   67.4
                                    noneOf                   Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:167:1-34                         3986      104839    0.0    1.5     0.0    1.5
                                    anyChar                  Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:171:1-30                         3980           1    0.0    0.0     0.0    0.0
                                    characterReference       Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(583,1)-(588,54)         3985           1    0.0    1.8     0.0    1.8
                                    charsInBalanced          Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(453,1)-(460,22)         3983           1    0.0    1.8     0.0    1.8
                                    cool_ok                  Text.Pandoc.Readers.Markdown        src/Text/Pandoc/Readers/Markdown.hs:1917:35-95              4018           1    0.0    0.0     0.0    0.0
                                     extensionEnabled        Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      4019           3    0.0    0.0     0.0    0.0
                                     readerExtensions        Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         4020           3    0.0    0.0     0.0    0.0
                                     stateOptions            Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    4021           3    0.0    0.0     0.0    0.0
                                     alphaNum                Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:199:1-29                         4027           1    0.0    0.0     0.0    0.0
                                     newline                 Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:183:1-27                         4025           1    0.0    0.0     0.0    0.0
                                     stTrace                 Text.Pandoc.Class.CommonState       src/Text/Pandoc/Class/CommonState.hs:55:5-11                4023           1    0.0    0.0     0.0    0.0
                                     stateNotes'             Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:54:5-15                    4029           1    0.0    0.0     0.0    0.0
                                     anyChar                 Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:171:1-30                         4024           0    0.0    0.0     0.0    0.0
                                     noneOf                  Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:167:1-34                         4028           0    0.0    0.0     0.0    0.0
                                     reportLogMessages       Text.Pandoc.Parsing.Capabilities    src/Text/Pandoc/Parsing/Capabilities.hs:(105,1)-(107,19)    4031           0    0.0    0.0     0.0    0.0
                                      stateLogMessages       Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:78:5-20                    4032           1    0.0    0.0     0.0    0.0
                                     runF                    Text.Pandoc.Parsing.Future          src/Text/Pandoc/Parsing/Future.hs:40:1-29                   4042           0    0.0    0.0     0.0    0.0
                                      extensionEnabled       Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      4053           1    0.0    0.0     0.0    0.0
                                      runDelayed             Text.Pandoc.Parsing.Future          src/Text/Pandoc/Parsing/Future.hs:28:31-40                  4043           1    0.0    0.0     0.0    0.0
                                      stateMeta'             Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:59:5-14                    4060           1    0.0    0.0     0.0    0.0
                                      doc                    Text.Pandoc.Builder                 src/Text/Pandoc/Builder.hs:275:1-30                         4046           0    0.0    0.0     0.0    0.0
                                      para                   Text.Pandoc.Builder                 src/Text/Pandoc/Builder.hs:451:1-32                         4055           0    0.0    0.0     0.0    0.0
                                      trimInlinesF           Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:151:1-32                 4049           0    0.0    0.0     0.0    0.0
                                       trimInlines           Text.Pandoc.Builder                 src/Text/Pandoc/Builder.hs:(259,1)-(270,22)                 4052           3    0.0    0.0     0.0    0.0
                                       imageWith             Text.Pandoc.Builder                 src/Text/Pandoc/Builder.hs:440:1-75                         4050           1    0.0    0.0     0.0    0.0
                                     spaceChar               Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:323:1-49                 4026           0    0.0    0.0     0.0    0.0
                                    escapeURI                Text.Pandoc.URI                     src/Text/Pandoc/URI.hs:(35,1)-(38,65)                       3992           1    0.0    0.0     1.0    0.0
                                     isBase64DataURI         Text.Pandoc.URI                     src/Text/Pandoc/URI.hs:(97,1)-(98,46)                       3994           0    0.0    0.0     1.0    0.0
                                      runParser              Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:111:7-15                  3995          49    0.0    0.0     0.0    0.0
                                      member                 Data.Attoparsec.Text.FastSet        internal/Data/Attoparsec/Text/FastSet.hs:(109,1)-(115,52)   4004          10    0.0    0.0     0.0    0.0
                                      fromPos                Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:46:21-27                  3998           5    0.0    0.0     0.0    0.0
                                      buffer                 Data.Attoparsec.Text.Buffer         internal/Data/Attoparsec/Text/Buffer.hs:79:1-49             3997           1    0.0    0.0     0.0    0.0
                                      unbufferAt             Data.Attoparsec.Text.Buffer         internal/Data/Attoparsec/Text/Buffer.hs:(85,1)-(87,26)      3996           1    0.0    0.0     0.0    0.0
                                      lengthCodeUnits        Data.Attoparsec.Text.Buffer         internal/Data/Attoparsec/Text/Buffer.hs:158:1-29            4000           0    0.0    0.0     0.0    0.0
                                      skipMany               Data.Attoparsec.Combinator          Data/Attoparsec/Combinator.hs:(220,1)-(221,40)              4006           0    1.0    0.0     1.0    0.0
                                       member                Data.Attoparsec.Text.FastSet        internal/Data/Attoparsec/Text/FastSet.hs:(109,1)-(115,52)   4009      104823    0.0    0.0     0.0    0.0
                                       runParser             Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:111:7-15                  4007          54    0.0    0.0     0.0    0.0
                                       fromPos               Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:46:21-27                  4008           7    0.0    0.0     0.0    0.0
                                       unbufferAt            Data.Attoparsec.Text.Buffer         internal/Data/Attoparsec/Text/Buffer.hs:(85,1)-(87,26)      4010           1    0.0    0.0     0.0    0.0
                                       demandInput           Data.Attoparsec.Internal            Data/Attoparsec/Internal.hs:(73,1)-(78,41)                  4013           0    0.0    0.0     0.0    0.0
                                        runParser            Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:111:7-15                  4014           3    0.0    0.0     0.0    0.0
                                        endOfInput           Data.Attoparsec.Internal            Data/Attoparsec/Internal.hs:(110,1)-(117,55)                4016           0    0.0    0.0     0.0    0.0
                                         runParser           Data.Attoparsec.Internal.Types      Data/Attoparsec/Internal/Types.hs:111:7-15                  4017           1    0.0    0.0     0.0    0.0
                                       lengthCodeUnits       Data.Attoparsec.Text.Buffer         internal/Data/Attoparsec/Text/Buffer.hs:158:1-29            4011           0    0.0    0.0     0.0    0.0
                                    fromStringToSources      Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:421:48-60                3981           1    0.0    0.0     0.0    0.0
                                    many1Char                Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:215:1-31                 3987           1    0.0    0.0     0.0    0.0
                                     spaceChar               Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:323:1-49                 3988           0    0.0    0.0     0.0    0.0
                                    newline                  Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:183:1-27                         3989           1    0.0    0.0     0.0    0.0
                                    oneOf                    Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:163:1-30                         3984           1    0.0    0.0     0.0    0.0
                                    parseFromStringRunParser Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:423:52-57                3979           1    0.0    0.0     0.0    0.0
                                    spaceChar                Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:323:1-49                 3982           1    0.0    0.0     0.0    0.0
                                    trimr                    Text.Pandoc.Shared                  src/Text/Pandoc/Shared.hs:194:1-27                          3991           0    0.0    0.0     0.0    0.0
                                   textStr                   Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:163:1-36                 3967           1    0.0    0.0     0.0    0.0
                                    string                   Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3968           1    0.0    0.0     0.0    0.0
                                   newline                   Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:183:1-27                         3971           0    0.0    0.0     0.0    0.0
                                   rawLaTeXInline            Text.Pandoc.Readers.LaTeX           src/Text/Pandoc/Readers/LaTeX.hs:(172,1)-(183,36)           3977           0    0.0    0.0     0.0    0.0
                                   string                    Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3975           0    0.0    0.0     0.0    0.0
                                newline                      Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:183:1-27                         3970           1    0.0    0.0     0.0    0.0
                                rawLaTeXInline               Text.Pandoc.Readers.LaTeX           src/Text/Pandoc/Readers/LaTeX.hs:(172,1)-(183,36)           3976           1    0.0    0.0     0.0    0.0
                                string                       Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3974           1    0.0    0.0     0.0    0.0
                                htmlTag                      Text.Pandoc.Readers.HTML            src/Text/Pandoc/Readers/HTML.hs:(1151,1)-(1216,17)          3973           0    0.0    0.0     0.0    0.0
                               anyChar                       Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:171:1-30                         3953           0    0.0    0.0     0.0    0.0
                               string                        Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3952           0    0.0    0.0     0.0    0.0
                              str                            Text.Pandoc.Builder                 src/Text/Pandoc/Builder.hs:353:1-21                         4057           0    0.0    0.0     0.0    0.0
                              upperAlpha                     Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(148,1)-(150,43)           3942           0    0.0    0.0     0.0    0.0
                              upperRoman                     Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(92,1)-(94,26)             3943           0    0.0    0.0     0.0    0.0
                             withRaw                         Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(554,1)-(559,48)         3906           0    0.0    0.0     0.0    0.0
                            stateInNote                      Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:56:5-15                    3899           1    0.0    0.0     0.0    0.0
                            decimal                          Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(104,1)-(106,55)           3884           0    0.0    0.0     0.0    0.0
                             digit                           Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:203:1-23                         3885           0    0.0    0.0     0.0    0.0
                            lowerAlpha                       Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(142,1)-(144,43)           3886           0    0.0    0.0     0.0    0.0
                            newline                          Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:183:1-27                         3926           0    0.0    0.0     0.0    0.0
                            oneOf                            Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:163:1-30                         3898           0    0.0    0.0     0.0    0.0
                            string                           Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3897           0    0.0    0.0     0.0    0.0
                            upperAlpha                       Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(148,1)-(150,43)           3880           0    0.0    0.0     0.0    0.0
                            upperRoman                       Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(92,1)-(94,26)             3882           0    0.0    0.0     0.0    0.0
                          upperAlpha                         Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(148,1)-(150,43)           3879           2    0.0    0.0     0.0    0.0
                          upperRoman                         Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(92,1)-(94,26)             3881           2    0.0    0.0     0.0    0.0
                           romanNumeral                      Text.Pandoc.Parsing.Lists           src/Text/Pandoc/Parsing/Lists.hs:(60,1)-(88,24)             3883           2    0.0    0.0     0.0    0.0
                         extensionEnabled                    Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      3870           2    0.0    0.0     0.0    0.0
                         readerExtensions                    Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         3871           2    0.0    0.0     0.0    0.0
                         stateOptions                        Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3872           2    0.0    0.0     0.0    0.0
                        readerTabStop                        Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:62:10-22                         3863           2    0.0    0.0     0.0    0.0
                        stateOptions                         Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3864           2    0.0    0.0     0.0    0.0
                        newline                              Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:183:1-27                         3866           0    0.0    0.0     0.0    0.0
                        spaceChar                            Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:323:1-49                 3865           0    0.0    0.0     0.0    0.0
                        string                               Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3867           0    0.0    0.0     0.0    0.0
                       rawLaTeXBlock                         Text.Pandoc.Readers.LaTeX           src/Text/Pandoc/Readers/LaTeX.hs:(141,1)-(154,60)           3860           1    0.0    0.0     0.0    0.0
                       readerTabStop                         Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:62:10-22                         3851           1    0.0    0.0     0.0    0.0
                       string                                Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3859           1    0.0    0.0     0.0    0.0
                       newline                               Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:183:1-27                         3856           0    0.0    0.0     0.0    0.0
                       textStr                               Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:163:1-36                 3853           0    0.0    0.0     0.0    0.0
                        string                               Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3855           0    0.0    0.0     0.0    0.0
                     extensionEnabled                        Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      3843           2    0.0    0.0     0.0    0.0
                     readerExtensions                        Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         3844           2    0.0    0.0     0.0    0.0
                     readerTabStop                           Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:62:10-22                         3840           2    0.0    0.0     0.0    0.0
                     spaceChar                               Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:323:1-49                 3842           0    0.0    0.0     0.0    0.0
                    stateOptions                             Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3835           3    0.0    0.0     0.0    0.0
                    readerTabStop                            Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:62:10-22                         3834           2    0.0    0.0     0.0    0.0
                    extensionEnabled                         Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      3837           1    0.0    0.0     0.0    0.0
                    readerExtensions                         Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         3838           1    0.0    0.0     0.0    0.0
                    spaceChar                                Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:323:1-49                 3836           0    0.0    0.0     0.0    0.0
                   stateOptions                              Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3820           9    0.0    0.0     0.0    0.0
                   extensionEnabled                          Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      3818           8    0.0    0.0     0.0    0.0
                   readerExtensions                          Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         3819           8    0.0    0.0     0.0    0.0
                   spaceChar                                 Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:323:1-49                 3831           4    0.0    0.0     0.0    0.0
                   htmlTag                                   Text.Pandoc.Readers.HTML            src/Text/Pandoc/Readers/HTML.hs:(1151,1)-(1216,17)          3821           3    0.0    0.0     0.0    0.0
                   anyLine                                   Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(169,1)-(188,28)         3825           2    0.0    0.0     0.0    0.0
                    oneOf                                    Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:163:1-30                         3827           0    0.0    0.0     0.0    0.0
                   gridTableWith'                            Text.Pandoc.Parsing.GridTable       src/Text/Pandoc/Parsing/GridTable.hs:(117,1)-(159,74)       3845           1    0.0    0.0     0.0    0.0
                    gridTable                                Text.GridTable.Parse                src/Text/GridTable/Parse.hs:(26,1)-(34,24)                  3847           1    0.0    0.0     0.0    0.0
                   oneOf                                     Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:163:1-30                         3826           1    0.0    0.0     0.0    0.0
                   readerTabStop                             Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:62:10-22                         3830           1    0.0    0.0     0.0    0.0
                   htmlInBalanced                            Text.Pandoc.Readers.HTML            src/Text/Pandoc/Readers/HTML.hs:(1102,1)-(1127,14)          3829           0    0.0    0.0     0.0    0.0
                   string                                    Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3824           0    0.0    0.0     0.0    0.0
                  readerExtensions                           Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         3806           4    0.0    0.0     0.0    0.0
                  readerTabStop                              Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:62:10-22                         3814           1    0.0    0.0     0.0    0.0
                  newline                                    Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:183:1-27                         3813           0    0.0    0.0     0.0    0.0
                  spaceChar                                  Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:323:1-49                 3804           0    0.0    0.0     0.0    0.0
                  yamlMetaBlock                              Text.Pandoc.Readers.Metadata        src/Text/Pandoc/Readers/Metadata.hs:(168,1)-(181,10)        3809           0    0.0    0.0     0.0    0.0
                   string                                    Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3811           0    0.0    0.0     0.0    0.0
                 spaceChar                                   Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:323:1-49                 3796          13    0.0    0.0     0.0    0.0
                 readerTabStop                               Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:62:10-22                         3800           1    0.0    0.0     0.0    0.0
                 stateOptions                                Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3801           1    0.0    0.0     0.0    0.0
                 newline                                     Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:183:1-27                         3798           0    0.0    0.0     0.0    0.0
                newline                                      Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:183:1-27                         3797           9    0.0    0.0     0.0    0.0
              newline                                        Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:183:1-27                         3812           3    0.0    0.0     0.0    0.0
              guardDisabled                                  Text.Pandoc.Parsing.Capabilities    src/Text/Pandoc/Parsing/Capabilities.hs:(118,1)-(119,67)    3868           2    0.0    0.0     0.0    0.0
              htmlInBalanced                                 Text.Pandoc.Readers.HTML            src/Text/Pandoc/Readers/HTML.hs:(1102,1)-(1127,14)          3828           2    0.0    0.0     0.0    0.0
              notFollowedBy'                                 Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(274,1)-(277,52)         3815           2    0.0    0.0     0.0    0.0
              skipSpaces                                     Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:340:1-31                 3817           2    0.0    0.0     0.0    0.0
              withRaw                                        Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(554,1)-(559,48)         3905           2    0.0    0.0     0.0    0.0
              anyChar                                        Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:171:1-30                         3910           1    0.0    0.0     0.0    0.0
              anyLine                                        Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(169,1)-(188,28)         3887           1    0.0    0.0     0.0    0.0
              blankline                                      Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:345:1-39                 3888           1    0.0    0.0     0.0    0.0
               newline                                       Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:183:1-27                         3891           1    0.0    0.0     0.0    0.0
               skipSpaces                                    Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:340:1-31                 3889           1    0.0    0.0     0.0    0.0
                spaceChar                                    Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:323:1-49                 3890           1    0.0    0.0     0.0    0.0
              citeKey                                        Text.Pandoc.Parsing.Citations       src/Text/Pandoc/Parsing/Citations.hs:(38,1)-(47,31)         3900           1    0.0    0.0     0.0    0.0
               notAfterString                                Text.Pandoc.Parsing.Capabilities    src/Text/Pandoc/Parsing/Capabilities.hs:(128,1)-(131,39)    3902           1    0.0    0.0     0.0    0.0
              lineBlockLines                                 Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(609,1)-(612,15)         3861           1    0.0    0.0     0.0    0.0
              noneOf                                         Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:167:1-34                         3924           1    0.0    0.0     0.0    0.0
              oneOf                                          Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:163:1-30                         3832           1    0.0    0.0     0.0    0.0
              stTrace                                        Text.Pandoc.Class.CommonState       src/Text/Pandoc/Class/CommonState.hs:55:5-11                3790           1    0.0    0.0     0.0    0.0
              textStr                                        Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:163:1-36                 3852           1    0.0    0.0     0.0    0.0
               string                                        Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3854           1    0.0    0.0     0.0    0.0
              yamlMetaBlock                                  Text.Pandoc.Readers.Metadata        src/Text/Pandoc/Readers/Metadata.hs:(168,1)-(181,10)        3808           1    0.0    0.0     0.0    0.0
               string                                        Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:179:1-18                         3810           1    0.0    0.0     0.0    0.0
              alphaNum                                       Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:199:1-29                         3913           0    0.0    0.0     0.0    0.0
              gobbleAtMostSpaces                             Text.Pandoc.Parsing.General         src/Text/Pandoc/Parsing/General.hs:(383,1)-(388,42)         3802           0    0.0    0.0     0.0    0.0
              htmlTag                                        Text.Pandoc.Readers.HTML            src/Text/Pandoc/Readers/HTML.hs:(1151,1)-(1216,17)          3822           0    0.0    0.0     0.0    0.0
           extensionEnabled                                  Text.Pandoc.Extensions              src/Text/Pandoc/Extensions.hs:196:1-58                      3765           2    0.0    0.0     0.0    0.0
           readerExtensions                                  Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:59:10-25                         3766           2    0.0    0.0     0.0    0.0
           stateOptions                                      Text.Pandoc.Parsing.State           src/Text/Pandoc/Parsing/State.hs:44:5-16                    3767           2    0.0    0.0     0.0    0.0
          initialSourceName                                  Text.Pandoc.Sources                 src/Text/Pandoc/Sources.hs:(140,1)-(141,56)                 3792           1    0.0    0.0     0.0    0.0
        reportLogMessages                                    Text.Pandoc.Parsing.Capabilities    src/Text/Pandoc/Parsing/Capabilities.hs:(105,1)-(107,19)    4030           1    0.0    0.0     0.0    0.0
        the_blocks                                           Text.Pandoc.Readers.Markdown        src/Text/Pandoc/Readers/Markdown.hs:319:38-48               3788           1    0.0    0.0     0.0    0.0
        toplevel.toSources                                   Text.Pandoc.Readers.Markdown        src/Text/Pandoc/Readers/Markdown.hs:70:74-84                3780           1    1.0    0.8     1.0    0.8
     parseURI                                                Network.URI                         Network/URI.hs:301:1-26                                     3749           0    0.0    0.0     0.0    0.0
    setInputFiles                                            Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:(221,1)-(232,69)       3646           1    0.0    0.0     0.0    0.0
    setNoCheckCertificate                                    Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:198:1-115              3648           1    0.0    0.0     0.0    0.0
    setOutputFile                                            Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:240:1-71               3647           1    0.0    0.0     0.0    0.0
    setResourcePath                                          Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:248:1-71               3645           1    0.0    0.0     0.0    0.0
    setTrace                                                 Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:185:1-73               3643           1    0.0    0.0     0.0    0.0
    setUserDataDir                                           Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:307:1-75               3642           1    0.0    0.0     0.0    0.0
    setVerbosity                                             Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:(159,1)-(160,58)       3644           1    0.0    0.0     0.0    0.0
    toTextM                                                  Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:(427,1)-(441,30)       3743           1    0.0    0.0     0.0    0.0
    unPandocIO                                               Text.Pandoc.Class.PandocIO          src/Text/Pandoc/Class/PandocIO.hs:44:3-12                   3641           1    0.0    0.0     0.0    0.0
    writerTemplate                                           Text.Pandoc.Options                 src/Text/Pandoc/Options.hs:308:5-18                         4182           1    0.0    0.0     0.0    0.0
    formatFromFilePaths                                      Text.Pandoc.Format                  src/Text/Pandoc/Format.hs:169:1-51                          3657           0    0.0    0.0     0.0    0.0
     parseURI                                                Network.URI                         Network/URI.hs:301:1-26                                     3662           0    0.0    0.0     0.0    0.0
    readDataFile                                             Text.Pandoc.Data                    src/Text/Pandoc/Data.hs:(71,1)-(79,42)                      3727           0    0.0    0.0     0.0    0.0
     checkUserDataDir                                        Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:(398,1)-(401,24)       3732           0    0.0    0.0     0.0    0.0
      getUserDataDir                                         Text.Pandoc.Class.PandocMonad       src/Text/Pandoc/Class/PandocMonad.hs:312:1-46               3733           0    0.0    0.0     0.0    0.0
       stUserDataDir                                         Text.Pandoc.Class.CommonState       src/Text/Pandoc/Class/CommonState.hs:34:5-17                3734           1    0.0    0.0     0.0    0.0
     fileExists                                              Text.Pandoc.Class.IO                src/Text/Pandoc/Class/IO.hs:194:1-55                        3738           0    0.0    0.0     0.0    0.0
     readDefaultDataFile                                     Text.Pandoc.Data                    src/Text/Pandoc/Data.hs:(43,1)-(53,36)                      3742           0    0.0    0.0     0.0    0.0
   writeFileWith                                             Text.Pandoc.UTF8                    src/Text/Pandoc/UTF8.hs:(61,1)-(62,63)                      4178           1    0.0    0.0     0.0    0.0
    hPutStrWith                                              Text.Pandoc.UTF8                    src/Text/Pandoc/UTF8.hs:(80,1)-(82,40)                      4180           1    0.0    0.0     0.0    0.0
   defaultUserDataDir                                        Text.Pandoc.Data                    src/Text/Pandoc/Data.hs:(236,1)-(245,23)                    3638           0    0.0    0.0     0.0    0.0
   setTranslations                                           Text.Pandoc.Translations            src/Text/Pandoc/Translations.hs:(47,1)-(48,72)              3735           0    0.0    0.0     0.0    0.0
  getEngine                                                  Text.Pandoc.Lua.Engine              src/Text/Pandoc/Lua/Engine.hs:(35,1)-(44,5)                 3596           1    0.0    0.0     0.0    0.0
   getglobal                                                 HsLua.Core.Primary                  src/HsLua/Core/Primary.hs:(250,1)-(252,66)                  3612           0    0.0    0.0     0.0    0.0
    liftLuaThrow                                             HsLua.Core.Error                    src/HsLua/Core/Error.hs:159:1-56                            3613           0    0.0    0.0     0.0    0.0
     liftLua                                                 HsLua.Core.Types                    src/HsLua/Core/Types.hs:107:1-32                            3614           0    0.0    0.0     0.0    0.0
      state                                                  HsLua.Core.Types                    src/HsLua/Core/Types.hs:118:1-24                            3617           0    0.0    0.0     0.0    0.0
       luaEnvState                                           HsLua.Core.Types                    src/HsLua/Core/Types.hs:86:5-15                             3618           1    0.0    0.0     0.0    0.0
   run                                                       HsLua.Core.Run                      src/HsLua/Core/Run.hs:41:1-69                               3599           0    0.0    0.0     0.0    0.0
    runWith                                                  HsLua.Core.Types                    src/HsLua/Core/Types.hs:124:1-53                            3600           1    0.0    0.0     0.0    0.0
     unLua                                                   HsLua.Core.Types                    src/HsLua/Core/Types.hs:92:26-30                            3601           1    0.0    0.0     0.0    0.0
     openlibs                                                HsLua.Core.Primary                  src/HsLua/Core/Primary.hs:516:1-32                          3604           0    0.0    0.0     0.0    0.0
      liftLua                                                HsLua.Core.Types                    src/HsLua/Core/Types.hs:107:1-32                            3605           0    0.0    0.0     0.0    0.0
       state                                                 HsLua.Core.Types                    src/HsLua/Core/Types.hs:118:1-24                            3607           0    0.0    0.0     0.0    0.0
        luaEnvState                                          HsLua.Core.Types                    src/HsLua/Core/Types.hs:86:5-15                             3608           1    0.0    0.0     0.0    0.0
   tostring                                                  HsLua.Core.Primary                  src/HsLua/Core/Primary.hs:(990,1)-(997,61)                  3623           0    0.0    0.0     0.0    0.0
    liftLua                                                  HsLua.Core.Types                    src/HsLua/Core/Types.hs:107:1-32                            3624           0    0.0    0.0     0.0    0.0
     state                                                   HsLua.Core.Types                    src/HsLua/Core/Types.hs:118:1-24                            3625           0    0.0    0.0     0.0    0.0
      luaEnvState                                            HsLua.Core.Types                    src/HsLua/Core/Types.hs:86:5-15                             3626           1    0.0    0.0     0.0    0.0
  parseOptionsFromArgs                                       Text.Pandoc.App.CommandLineOptions  src/Text/Pandoc/App/CommandLineOptions.hs:(75,1)-(103,63)   3631           1    0.0    0.0     0.0    0.0
   optIncludeAfterBody                                       Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:175:7-25                         3711           1    0.0    0.0     0.0    0.0
   optIncludeBeforeBody                                      Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:174:7-26                         3710           1    0.0    0.0     0.0    0.0
   optIncludeInHeader                                        Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:176:7-24                         3709           1    0.0    0.0     0.0    0.0
   optInputFiles                                             Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:118:7-19                         3659           1    0.0    0.0     0.0    0.0
   optSelfContained                                          Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:123:7-22                         3708           1    0.0    0.0     0.0    0.0
   optStandalone                                             Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:106:7-19                         3706           1    0.0    0.0     0.0    0.0
   optTemplate                                               Text.Pandoc.App.Opt                 src/Text/Pandoc/App/Opt.hs:113:7-17                         3707           1    0.0    0.0     0.0    0.0
   options                                                   Text.Pandoc.App.CommandLineOptions  src/Text/Pandoc/App/CommandLineOptions.hs:(274,1)-(1142,5)  3633           0    0.0    0.0     0.0    0.0

edit: I tried out "late profiling" and got a cost center tree that led me more reasonably to the source parser in the Markdown reader. Doing another special-case parse of data URIs, with Parsec this time (and avoiding a lot of calls to litChar) cut allocation down by about half, tho I didn't have profiling enabled on that build for whatever reason.

The lesson learned here is there's more than one thing where allocation blows up when the length of a URI is ~kilobytes, and possibly more than three things.

@jgm
Copy link
Owner

jgm commented Dec 2, 2024

This looks like progress, anyway! It's worth integrating your shortcutting code, probably, and then we can look into the next bottleneck.

I usually use profiterole or profiteur to put the profiling output into more intelligible form.

silby added a commit to silby/pandoc that referenced this issue Dec 4, 2024
(in some places)

Very long data: URIs in source documents are causing outsized memory
usage due to various parsing inefficiencies, for instance in
Network.URI, TagSoup, and T.P.R.Markdown.source. See e.g. jgm#10075.

This change improves the situation in a couple places we can control
relatively easily by using an attoparsec text-specialized parser to
consume base64-encoded strings. Attoparsec's takeWhile + inClass
functions are designed to chew through long strings like this without
doing unnecessary allocation, and the improvements in peak heap
allocation are significant.

One of the observations here is that if you parse something as a valid
data: uri it shouldn't need any further escaping so we can short-circuit
various processing steps that may unpack/iterate over the chars in the
URI.
silby added a commit to silby/pandoc that referenced this issue Dec 4, 2024
(in some places)

Very long data: URIs in source documents are causing outsized memory
usage due to various parsing inefficiencies, for instance in
Network.URI, TagSoup, and T.P.R.Markdown.source. See e.g. jgm#10075.

This change improves the situation in a couple places we can control
relatively easily by using an attoparsec text-specialized parser to
consume base64-encoded strings. Attoparsec's takeWhile + inClass
functions are designed to chew through long strings like this without
doing unnecessary allocation, and the improvements in peak heap
allocation are significant.

One of the observations here is that if you parse something as a valid
data: uri it shouldn't need any further escaping so we can short-circuit
various processing steps that may unpack/iterate over the chars in the
URI.
@jgm
Copy link
Owner

jgm commented Dec 4, 2024

Regarding the tagsoup issue: I see that there is this "fast" tagsoup parser:
https://hackage.haskell.org/package/fast-tagsoup-1.0.14/docs/Text-HTML-TagSoup-Fast.html

It has some major drawbacks: (a) not maintained since 2017, (b) depends on text-icu, which has a huge C library dependency that is hard to install.

But it is actually only one 500 line module which replaces the tagsoup parser, and if this worked we could simply vendor it. It would be easy to remove the text-icu usage, since we will already have decoded the document in an earlier stage.

The question is whether it parses as accurately as tagsoup, but it could be worth trying it.

[EDIT:] There is also a version that does not depend on text-icu:
https://hackage.haskell.org/package/fast-tagsoup-utf8-only-1.0.5/docs/Text-HTML-TagSoup-Fast-Utf8Only.html

But there's a problem with both of these: they don't support parsing with source positions, which we use in our code.

[EDIT2:] This is an alternative fast HTML5 tokenizer:
https://hackage.haskell.org/package/html-parse
It claims to be >10x faster than tagsoup, and it is recently maintained.
Unfortunately, it also does not support source positions.

jgm added a commit that referenced this issue Dec 18, 2024
It can be very expensive to call network-uri's URI parser on
these. See #10075.
@jgm
Copy link
Owner

jgm commented Dec 18, 2024

Effect of ca4ad3b on html -> json:

before:

<<ghc: 21601219456 bytes, 2588 GCs, 247465337/1295669152 avg/max bytes residency (11 samples), 2565M in use, 0.002 INIT (0.004 elapsed), 2.492 MUT (2.251 elapsed), 2.527 GC (2.946 elapsed) :ghc>>

after:

<<ghc: 14303787104 bytes, 1711 GCs, 226993029/1295672032 avg/max bytes residency (12 samples), 2565M in use, 0.003 INIT (0.003 elapsed), 1.930 MUT (1.656 elapsed), 1.847 GC (2.164 elapsed) :ghc>>

@jgm
Copy link
Owner

jgm commented Dec 18, 2024

Effect of 3da4d41 on md -> json:

before:

<<ghc: 51182690768 bytes, 6182 GCs, 167000803/653531344 avg/max bytes residency (11 samples), 1578M in use, 0.001 INIT (0.001 elapsed), 5.471 MUT (5.316 elapsed), 1.473 GC (1.656 elapsed) :ghc>>

after:

<<ghc: 8061106560 bytes, 951 GCs, 19459562/37119064 avg/max bytes residency (6 samples), 80M in use, 0.002 INIT (0.005 elapsed), 1.247 MUT (1.205 elapsed), 0.035 GC (0.242 elapsed) :ghc>>

jgm added a commit that referenced this issue Dec 18, 2024
This patch borrows some code from @silby's PR #10434 and should
be regarded as co-authored.  This is a lighter-weight patch
that only touches the Markdown reader.

The basic idea is to speed up parsing of base64 URIs by parsing
them with a special path.  This should improve the problem
noted at #10075.

Benchmarks (optimized compilation):

Converting the large test.md from #10075 (7.6Mb embedded image)
from markdown to json,

before: 6182 GCs, 1578M in use, 5.471 MUT (5.316 elapsed), 1.473 GC (1.656 elapsed)

after: 951 GCs, 80M in use, .247 MUT (1.205 elapsed), 0.035 GC (0.242 elapsed)

For now we leave #10075 open to investigate improvements in
HTML rendering with these large data URIs.
jgm added a commit that referenced this issue Dec 18, 2024
This patch borrows some code from @silby's PR #10434 and should
be regarded as co-authored.  This is a lighter-weight patch
that only touches the Markdown reader.

The basic idea is to speed up parsing of base64 URIs by parsing
them with a special path.  This should improve the problem
noted at #10075.

Benchmarks (optimized compilation):

Converting the large test.md from #10075 (7.6Mb embedded image)
from markdown to json,

before: 6182 GCs, 1578M in use, 5.471 MUT (5.316 elapsed), 1.473 GC (1.656 elapsed)

after: 951 GCs, 80M in use, .247 MUT (1.205 elapsed), 0.035 GC (0.242 elapsed)

For now we leave #10075 open to investigate improvements in
HTML rendering with these large data URIs.

Co-authored-by: Evan Silberman <evan@jklol.net>
jgm added a commit that referenced this issue Dec 18, 2024
This patch borrows some code from @silby's PR #10434 and should
be regarded as co-authored.  This is a lighter-weight patch
that only touches the Markdown reader.

The basic idea is to speed up parsing of base64 URIs by parsing
them with a special path.  This should improve the problem
noted at #10075.

Benchmarks (optimized compilation):

Converting the large test.md from #10075 (7.6Mb embedded image)
from markdown to json,

before: 6182 GCs, 1578M in use, 5.471 MUT, 1.473 GC

after: 951 GCs, 80M in use, .247 MUT, 0.035 GC

For now we leave #10075 open to investigate improvements in
HTML rendering with these large data URIs.

Co-authored-by: Evan Silberman <evan@jklol.net>
jgm added a commit that referenced this issue Dec 19, 2024
Text.Pandoc.URI: export `pBase64DataURI`.  Modify `isURI` to use this
and avoid calling network-uri's inefficient `parseURI` for data URIs.

Markdown reader: use T.P.URI's `pBase64DataURI` in parsing data
URIs.

Partially addresses #10075.

Obsoletes #10434 (borrowing most of its ideas).

Co-authored-by: Evan Silberman <evan@jklol.net>
jgm added a commit that referenced this issue Dec 19, 2024
This was done to determine the "media category," but we can
get that directly from the mime component of data: URIs.

Profiling revealed that a significant amount of time was
spent in this function when a file contained images with
large data URIs.

Contributes to addressing #10075.
@jgm
Copy link
Owner

jgm commented Dec 19, 2024

Here's a profile with the current HEAD version on the above html -> docx conversion:
image

There are uses of parseURIReference in the fetchItem and mediabag functions, which we should also take a look at.

jgm added a commit that referenced this issue Dec 19, 2024
This avoids calling the slow URI parser from network-uri on
data URIs, instead calling our own parser.

Benchmarks on an html -> docx conversion with large base64 image:
GCs from 7942 to 6695, memory in use from 3781M to 2351M,
GC time from 7.5 to 5.6.

See #10075.
jgm added a commit that referenced this issue Dec 19, 2024
Avoid the slow URI parser from network-uri on large data URIs.

See #10075. In a benchmark with a large base64 image in HTML ->
docx, this patch causes us to go from 7942 GCs to 3654, and from
3781M in use to 1396M in use.

(Note that before the last few commits, this was running 9099 GCs
and 4350M in use.)
@jgm
Copy link
Owner

jgm commented Dec 19, 2024

With the latest changes, the md -> docx benchmark above has gone down to:
3654 GCs, 473M in use. Not bad considering that we started out with 12695 GCs and 3435M in use. Perhaps we can now close this issue.

@jgm
Copy link
Owner

jgm commented Dec 19, 2024

HTML reader still uses more memory than it should, but this seems to be a separate issue with tagsoup.

@jgm jgm closed this as completed Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants