<p></p>
<p>OK, took me long enough to work on that one, but please give the branch <a href="/geany/geany/tree/startup-speed"><code>startup-speed</code></a> a spin.</p>
<p>My results, which are the mean average time (measuring <code>document_open_file_full()</code>) for opening Geany's <code>src/*.[ch]</code> (96 C files), best out of 3 runs:</p>
<table role="table">
<thead>
<tr>
<th>1.36 (A)</th>
<th>1.37 fixed-width (B)</th>
<th>±1.37.1 (C)</th>
<th><code>startup-speed</code> branch (D)</th>
</tr>
</thead>
<tbody>
<tr>
<td>0.048028s</td>
<td>0.068192s</td>
<td>0.146446s</td>
<td>0.048415s</td>
</tr>
<tr>
<td><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/geany/geany/commit/825acb21eabd33390616b224b0454886dc7d6ec2/hovercard" href="https://github.com/geany/geany/commit/825acb21eabd33390616b224b0454886dc7d6ec2"><tt>825acb2</tt></a></td>
<td><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/geany/geany/commit/d9f8cdbad58d09f0c18ca8acccb49209263018f0/hovercard" href="https://github.com/geany/geany/commit/d9f8cdbad58d09f0c18ca8acccb49209263018f0"><tt>d9f8cdb</tt></a> patched to use fixed 16px-wide margins</td>
<td><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/geany/geany/commit/d9f8cdbad58d09f0c18ca8acccb49209263018f0/hovercard" href="https://github.com/geany/geany/commit/d9f8cdbad58d09f0c18ca8acccb49209263018f0"><tt>d9f8cdb</tt></a></td>
<td><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/geany/geany/commit/b08ae0fe65c0942dca20281d6841dc83406d8b5e/hovercard" href="https://github.com/geany/geany/commit/b08ae0fe65c0942dca20281d6841dc83406d8b5e"><tt>b08ae0f</tt></a></td>
</tr>
</tbody>
</table>
<p>mean difference (<code>round(Y * 100 / X)</code>):</p>
<table role="table">
<thead>
<tr>
<th> </th>
<th>A</th>
<th>B</th>
<th>C</th>
<th>D</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>A</strong></td>
<td>100%</td>
<td>70%</td>
<td>33%</td>
<td>99%</td>
</tr>
<tr>
<td><strong>B</strong></td>
<td>142%</td>
<td>100%</td>
<td>47%</td>
<td>141%</td>
</tr>
<tr>
<td><strong>C</strong></td>
<td>305%</td>
<td>215%</td>
<td>100%</td>
<td>302%</td>
</tr>
<tr>
<td><strong>D</strong></td>
<td>101%</td>
<td>71%</td>
<td>33%</td>
<td>100%</td>
</tr>
</tbody>
</table>
<p>As you can see, my branch is ever so slightly slower than 1.36 -- if the precision here means anything. I'm not sure why 1.37 with fixed-width margins is so much slower than 1.36, maybe a change in Scintilla?  Not sure.</p>
<p>Anyway, the conclusion can be that 1.37 is real slow, about 3 times slower than 1.36 in my example. My proposed fix is back to 1.36-level speeds, and keeps the dynamic margin sizes, so I think it's a win-win, although there's indeed a little more code complexity.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/2649#issuecomment-773664375">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ2N6JNC5NWAQYVJPCTS5MSW3ANCNFSM4TOTNBYA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJZ3KW4XQ7HNJX3KLFLS5MSW3A5CNFSM4TOTNBYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFYOS45Y.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2649#issuecomment-773664375",
"url": "https://github.com/geany/geany/issues/2649#issuecomment-773664375",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>