<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>


<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<div style="">
<p dir="auto">That looks like a N^2 behavior.</p>
<p dir="auto">What about</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">if (have_null || have_srp || have_rsa_psk) {</span>
<span id="LC2" class="line" lang="plaintext">  for (i = j = 0; i < priority_cache->protocol.num_priorities; i++) {</span>
<span id="LC3" class="line" lang="plaintext">    vers = version_to_entry(priority_cache->protocol.priorities[i]);</span>
<span id="LC4" class="line" lang="plaintext">    if (!vers || !vers->tls13_sem)</span>
<span id="LC5" class="line" lang="plaintext">      priority_cache->protocol.priorities[j++] = priority_cache->protocol.priorities[i];</span>
<span id="LC6" class="line" lang="plaintext">  }</span>
<span id="LC7" class="line" lang="plaintext">}</span>
<span id="LC8" class="line" lang="plaintext">priority_cache->protocol.num_priorities = j;</span></code></pre>
</div>


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

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/issues/679#note_134151619">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/sent_notifications/fb4efc74238d1fc55adb095d2ea7e6eb/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/gnutls/issues/679#note_134151619"}}</script>
</p>
</div>
</body>
</html>