Skip to content

Asciidoctor: Fix crash on broken definition lists #540

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

Merged
merged 1 commit into from
Jan 18, 2019

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Jan 15, 2019

Our TreeProcessorScaffold would crash on definition lists where a term
wasn't matched with a definition. While these are broken definition
lists it is not ok for us to crash on them. This skips processing the
nil block that comes from such lists.

At this point the Elasticsearch reference builds, though it builds with
quite a few errors. The difference in performance is not as amazing
as the java-rest client but it is still substantial:

      Asciidoctor   Asciidoc
real  1m01.913s     3m09.738s
user  0m55.742s     3m02.545s
sys   0m02.910s     0m04.420s

So about 1/3 the time. For reference, this is the java rest client:

      Asciidoctor   Asciidoc
real  0m10.341s     1m05.432s
user  0m09.497s     0m55.270s
sys   0m00.616s     0m07.758s

Which, I suppose, is still just 1/6. It certainly feels faster though.

Our `TreeProcessorScaffold` would crash on definition lists where a term
wasn't matched with a definition. While these *are* broken definition
lists it is not ok for us to crash on them. This skips processing the
`nil` block that comes from such lists.

At this point the Elasticsearch reference builds, though it builds with
quite a few errors. The difference in performance is not as amazing
as the java-rest client but it is still substantial:

      Asciidoctor   Asciidoc
real  1m01.913s     3m09.738s
user  0m55.742s     3m02.545s
sys   0m02.910s     0m04.420s

So about 1/3 the time. For reference, this is the java rest client:

      Asciidoctor   Asciidoc
real  0m10.341s     1m05.432s
user  0m09.497s     0m55.270s
sys   0m00.616s     0m7.758s

Which, I suppose, is still just 1/6.
@nik9000 nik9000 requested a review from ddillinger January 15, 2019 14:49
@nik9000 nik9000 mentioned this pull request Jan 17, 2019
@nik9000
Copy link
Member Author

nik9000 commented Jan 18, 2019

Thanks for reviewing @ddillinger!

@nik9000 nik9000 merged commit 0971874 into elastic:master Jan 18, 2019
bmorelli25 pushed a commit to bmorelli25/docs that referenced this pull request Feb 15, 2019
Our `TreeProcessorScaffold` would crash on definition lists where a term
wasn't matched with a definition. While these *are* broken definition
lists it is not ok for us to crash on them. This skips processing the
`nil` block that comes from such lists.

At this point the Elasticsearch reference builds, though it builds with
quite a few errors. The difference in performance is not as amazing
as the java-rest client but it is still substantial:

      Asciidoctor   Asciidoc
real  1m01.913s     3m09.738s
user  0m55.742s     3m02.545s
sys   0m02.910s     0m04.420s

So about 1/3 the time. For reference, this is the java rest client:

      Asciidoctor   Asciidoc
real  0m10.341s     1m05.432s
user  0m09.497s     0m55.270s
sys   0m00.616s     0m7.758s

Which, I suppose, is still just 1/6.
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.

2 participants