bytesparadise / libasciidoc

A Golang library for processing Asciidoc files.
Apache License 2.0
205 stars 25 forks source link

refactor(parser): reparse content if needed only #1071

Closed xcoulon closed 2 years ago

xcoulon commented 2 years ago

ie, if attribute substitution occurred

Signed-off-by: Xavier Coulon xcoulon@redhat.com

codecov[bot] commented 2 years ago

Codecov Report

Merging #1071 (231c6b8) into master (25aad00) will decrease coverage by 0.07%. The diff coverage is 65.93%.

@@            Coverage Diff             @@
##           master    #1071      +/-   ##
==========================================
- Coverage   80.99%   80.91%   -0.08%     
==========================================
  Files          90       90              
  Lines        7540     7583      +43     
==========================================
+ Hits         6107     6136      +29     
- Misses        944      950       +6     
- Partials      489      497       +8     
github-actions[bot] commented 2 years ago

Comparing with master branch:

name                                          old time/op    new time/op    delta
RealDocumentProcessing/demo.adoc-2              37.3ms ± 3%    37.4ms ± 2%   ~     (p=0.730 n=9+9)
RealDocumentProcessing/vertx-examples.adoc-2     136ms ± 1%     136ms ± 2%   ~     (p=1.000 n=9+10)
RealDocumentProcessing/mocking.adoc-2           84.4ms ± 2%    84.3ms ± 3%   ~     (p=0.912 n=10+10)

name                                          old alloc/op   new alloc/op   delta
RealDocumentProcessing/demo.adoc-2              13.9MB ± 0%    13.9MB ± 0%   ~     (p=0.931 n=9+9)
RealDocumentProcessing/vertx-examples.adoc-2    45.4MB ± 0%    45.4MB ± 0%   ~     (p=0.165 n=10+10)
RealDocumentProcessing/mocking.adoc-2           28.4MB ± 0%    28.4MB ± 0%   ~     (p=0.684 n=10+10)

name                                          old allocs/op  new allocs/op  delta
RealDocumentProcessing/demo.adoc-2                170k ± 0%      170k ± 0%   ~     (p=0.931 n=9+9)
RealDocumentProcessing/vertx-examples.adoc-2      671k ± 0%      671k ± 0%   ~     (p=0.280 n=10+10)
RealDocumentProcessing/mocking.adoc-2             432k ± 0%      432k ± 0%   ~     (p=0.643 n=10+10)

Comparing with latest release:

name                                          old time/op    new time/op    delta
RealDocumentProcessing/demo.adoc-2              19.2ms ± 2%    37.4ms ± 2%   +94.69%  (p=0.000 n=9+9)
RealDocumentProcessing/vertx-examples.adoc-2    53.8ms ± 1%   136.1ms ± 2%  +152.87%  (p=0.000 n=10+10)
RealDocumentProcessing/mocking.adoc-2           52.1ms ± 2%    84.3ms ± 3%   +61.86%  (p=0.000 n=9+10)

name                                          old alloc/op   new alloc/op   delta
RealDocumentProcessing/demo.adoc-2              8.85MB ± 0%   13.87MB ± 0%   +56.77%  (p=0.000 n=10+9)
RealDocumentProcessing/vertx-examples.adoc-2    24.0MB ± 0%    45.4MB ± 0%   +89.47%  (p=0.000 n=10+10)
RealDocumentProcessing/mocking.adoc-2           21.6MB ± 0%    28.4MB ± 0%   +31.30%  (p=0.000 n=10+10)

name                                          old allocs/op  new allocs/op  delta
RealDocumentProcessing/demo.adoc-2                106k ± 0%      170k ± 0%   +60.16%  (p=0.000 n=10+9)
RealDocumentProcessing/vertx-examples.adoc-2      305k ± 0%      671k ± 0%  +119.89%  (p=0.000 n=6+10)
RealDocumentProcessing/mocking.adoc-2             326k ± 0%      432k ± 0%   +32.46%  (p=0.000 n=10+10)