<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>

<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: var(--default-regular-font, "GitLab Sans"),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: var(--default-regular-font, "GitLab Sans"),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">

<p class="details" style="font-style: italic; color: #737278;">
<a href="https://gitlab.com/thka">Thomas Karlsson</a> created an issue: <a href="https://gitlab.com/gnutls/libtasn1/-/issues/51">#51</a>
</p>
<div class="md" style="color: #333238; word-wrap: break-word;">
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: .3em; border-bottom-width: 1px; border-bottom-color: #bfbfc3; border-bottom-style: solid; color: #333238; margin: 0 0 16px;" align="initial">
<a href="#description-of-problem" aria-hidden="true" class="anchor" id="user-content-description-of-problem" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Description of problem:</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">The time to parse an CRL file is not linear to how many entries there are in the file.
I noticed this while using certtool to view a CRL file with approximately 56000 entries. I don't remember but it took a few minutes to parse the whole file.
The reason I'm posting this issue here is that with my limited skills traced it back to lib/decoding.c and to the function asn1_der_decoding2, but I'm not sure.</p>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: .3em; border-bottom-width: 1px; border-bottom-color: #bfbfc3; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a href="#version-of-libtasn1-used" aria-hidden="true" class="anchor" id="user-content-version-of-libtasn1-used" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Version of libtasn1 used:</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">4.19.0</p>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: .3em; border-bottom-width: 1px; border-bottom-color: #bfbfc3; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a href="#distributor-of-libtasn1-eg-ubuntu-fedora-rhel" aria-hidden="true" class="anchor" id="user-content-distributor-of-libtasn1-eg-ubuntu-fedora-rhel" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Distributor of libtasn1 (e.g., Ubuntu, Fedora, RHEL)</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">Debian bookworm</p>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: .3em; border-bottom-width: 1px; border-bottom-color: #bfbfc3; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a href="#how-reproducible" aria-hidden="true" class="anchor" id="user-content-how-reproducible" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>How reproducible:</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">Steps to Reproduce:</p>
<ul dir="auto" style="text-align: initial; list-style-type: disc; margin: 0 0 16px; padding: 0;">
<li style="margin-top: 0; line-height: 1.6em; margin-left: 25px; padding-left: 3px;">Create a CRL with a lot of entries. I used crlbuilder by wbond. I can provide the script if requested.</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">time certtool --crl-info --infile root.crl.pem</li>
</ul>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: .3em; border-bottom-width: 1px; border-bottom-color: #bfbfc3; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a href="#actual-results" aria-hidden="true" class="anchor" id="user-content-actual-results" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Actual results:</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">Here is a table with how many entries is the CRL, seconds it took (time certtool --crl-info --infile root.crl.pem) and per entry.
entr  sec.    per entry
4000  0.253s  0.063ms
5000  0.422s  0.084ms
6000  0.652s  0.108ms
7000  0.832s  0.119ms
8000  1.143s  0.143ms
9000  1.530s  0.170ms
10000 2.034s  0.203ms
11000 2.692s  0.245ms
12000 4.020s  0.335ms
13000 5.215s  0.401ms
14000 6.505s  0.465ms
15000 8.810s  0.587ms
16000 10.734s 0.671ms
17000 12.688s 0.746ms</p>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: .3em; border-bottom-width: 1px; border-bottom-color: #bfbfc3; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a href="#expected-results" aria-hidden="true" class="anchor" id="user-content-expected-results" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Expected results:</h2>
<p dir="auto" style="color: #333238; margin: 0;" align="initial">I don't know why but I think the time should be linear.</p>
</div>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #737278;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/libtasn1/-/issues/51">view it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.com">gitlab.com</a>. <a href="https://gitlab.com/-/sent_notifications/4ee15aa6307fa7c6c38aa6fc8aa154a8/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.com/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.com/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/libtasn1/-/issues/51"}}</script>


</p>
</div>
</body>
</html>