-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Quadratic time consumption on pathological input #31
Comments
Is this actually quadratic right now? $ time python -c 'print("[a](<b" * 50000)' | target/debug/comrak > /dev/null
target/debug/comrak > /dev/null 1.39s user 0.02s system 98% cpu 1.431 total
$ time python -c 'print("[a](<b" * 100000)' | target/debug/comrak > /dev/null
target/debug/comrak > /dev/null 2.93s user 0.05s system 99% cpu 3.007 total
$ time python -c 'print("[a](<b" * 200000)' | target/debug/comrak > /dev/null
target/debug/comrak > /dev/null 5.41s user 0.07s system 99% cpu 5.505 total Time taken is roughly doubling with each doubling of input size. |
I think my most recent patch fixed it.
…On Aug 27, 2017 8:41 PM, "Ashe Connor" ***@***.***> wrote:
Is this actually quadratic right now?
$ time python -c 'print("[a](<b" * 50000)' | target/debug/comrak > /dev/null
target/debug/comrak > /dev/null 1.39s user 0.02s system 98% cpu 1.431 total
$ time python -c 'print("[a](<b" * 100000)' | target/debug/comrak > /dev/null
target/debug/comrak > /dev/null 2.93s user 0.05s system 99% cpu 3.007 total
$ time python -c 'print("[a](<b" * 200000)' | target/debug/comrak > /dev/null
target/debug/comrak > /dev/null 5.41s user 0.07s system 99% cpu 5.505 total
Time taken is roughly doubling with each doubling of input size.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGGWBwixjYeDZJ_suigcEvPtF9HsBOnKks5scgzNgaJpZM4Ounhm>
.
|
Oh, you're totally right. I was not awake when I checked this issue last, sorry. Thanks again for #33! |
brson
pushed a commit
to brson/comrak
that referenced
this issue
Jul 3, 2018
brson
pushed a commit
to brson/comrak
that referenced
this issue
Jul 3, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See commonmark/cmark#218. Comrak is also vulnerable:
The text was updated successfully, but these errors were encountered: