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

refactor(renderer): move context and switch/call to backends #1064

Merged
merged 1 commit into from
Jul 7, 2022

Conversation

xcoulon
Copy link
Member

@xcoulon xcoulon commented Jul 7, 2022

move Context from pkg/renderer into pkg/renderer/sgml and make
it unexported, and refactor the way to run the renderer on the doc:

html5.Render(doc, config, out)

Signed-off-by: Xavier Coulon [email protected]

move `Context` from `pkg/renderer` into `pkg/renderer/sgml` and make
it unexported, and refactor the way to run the renderer on the doc:
```
html5.Render(doc, config, out)
```

Signed-off-by: Xavier Coulon <[email protected]>
@codecov
Copy link

codecov bot commented Jul 7, 2022

Codecov Report

Merging #1064 (b49592d) into master (9f09049) will increase coverage by 0.07%.
The diff coverage is 95.15%.

@@            Coverage Diff             @@
##           master    #1064      +/-   ##
==========================================
+ Coverage   81.32%   81.40%   +0.07%     
==========================================
  Files          85       87       +2     
  Lines        7454     7452       -2     
==========================================
+ Hits         6062     6066       +4     
+ Misses        876      871       -5     
+ Partials      516      515       -1     

@github-actions
Copy link

github-actions bot commented Jul 7, 2022

Comparing with master branch:

name                                          old time/op    new time/op    delta
RealDocumentProcessing/demo.adoc-2              25.1ms ± 2%    25.1ms ± 1%   ~     (p=0.605 n=9+9)
RealDocumentProcessing/vertx-examples.adoc-2    64.3ms ± 0%    64.4ms ± 1%   ~     (p=0.968 n=9+10)
RealDocumentProcessing/mocking.adoc-2           69.6ms ± 0%    69.5ms ± 0%   ~     (p=0.529 n=10+10)

name                                          old alloc/op   new alloc/op   delta
RealDocumentProcessing/demo.adoc-2              10.8MB ± 0%    10.8MB ± 0%   ~     (p=0.606 n=7+9)
RealDocumentProcessing/vertx-examples.adoc-2    27.2MB ± 0%    27.2MB ± 0%   ~     (p=0.280 n=10+10)
RealDocumentProcessing/mocking.adoc-2           25.0MB ± 0%    25.0MB ± 0%   ~     (p=0.968 n=9+10)

name                                          old allocs/op  new allocs/op  delta
RealDocumentProcessing/demo.adoc-2                126k ± 0%      126k ± 0%   ~     (p=0.626 n=7+9)
RealDocumentProcessing/vertx-examples.adoc-2      341k ± 0%      341k ± 0%   ~     (p=0.382 n=10+10)
RealDocumentProcessing/mocking.adoc-2             374k ± 0%      374k ± 0%   ~     (p=0.711 n=8+10)

Comparing with latest release:

name                                          old time/op    new time/op    delta
RealDocumentProcessing/demo.adoc-2              16.9ms ± 0%    25.1ms ± 1%  +48.13%  (p=0.000 n=8+9)
RealDocumentProcessing/vertx-examples.adoc-2    47.9ms ± 1%    64.4ms ± 1%  +34.32%  (p=0.000 n=9+10)
RealDocumentProcessing/mocking.adoc-2           47.3ms ± 1%    69.5ms ± 0%  +46.92%  (p=0.000 n=10+10)

name                                          old alloc/op   new alloc/op   delta
RealDocumentProcessing/demo.adoc-2              8.85MB ± 0%   10.82MB ± 0%  +22.23%  (p=0.000 n=10+9)
RealDocumentProcessing/vertx-examples.adoc-2    24.0MB ± 0%    27.2MB ± 0%  +13.39%  (p=0.000 n=9+10)
RealDocumentProcessing/mocking.adoc-2           21.6MB ± 0%    25.0MB ± 0%  +15.73%  (p=0.000 n=10+10)

name                                          old allocs/op  new allocs/op  delta
RealDocumentProcessing/demo.adoc-2                106k ± 0%      126k ± 0%  +18.83%  (p=0.000 n=10+9)
RealDocumentProcessing/vertx-examples.adoc-2      305k ± 0%      341k ± 0%  +11.72%  (p=0.000 n=10+10)
RealDocumentProcessing/mocking.adoc-2             326k ± 0%      374k ± 0%  +14.51%  (p=0.000 n=7+10)

@xcoulon xcoulon merged commit e12e660 into bytesparadise:master Jul 7, 2022
@xcoulon xcoulon deleted the refactor_renderer_context branch July 7, 2022 06:10
xcoulon added a commit to xcoulon/libasciidoc that referenced this pull request Jul 7, 2022
also, update comments
follow-up of bytesparadise#1064

Signed-off-by: Xavier Coulon <[email protected]>
xcoulon added a commit that referenced this pull request Jul 7, 2022
also, update comments
follow-up of #1064

Signed-off-by: Xavier Coulon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant