<p>Dynamic margin width computation introduced in 1.37 is "slow", and can lead to about 3× slowdowns, which is most noticeable when loading startup files.</p>
<p><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #2649.">Fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="738568743" data-permission-text="Title is private" data-url="https://github.com/geany/geany/issues/2649" data-hovercard-type="issue" data-hovercard-url="/geany/geany/issues/2649/hovercard" href="https://github.com/geany/geany/issues/2649">#2649</a>.  Probably <span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #20.">fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="738229204" data-permission-text="Title is private" data-url="https://github.com/geany/geany-osx/issues/20" data-hovercard-type="issue" data-hovercard-url="/geany/geany-osx/issues/20/hovercard" href="https://github.com/geany/geany-osx/issues/20">geany/geany-osx#20</a> as well.</p>
<p>This PR is mostly FTR and to let <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/techee/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/techee">@techee</a> check on OSX, there has already been some review and testing (see commit comments and comments starting at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="738568743" data-permission-text="Title is private" data-url="https://github.com/geany/geany/issues/2649" data-hovercard-type="issue" data-hovercard-url="/geany/geany/issues/2649/hovercard?comment_id=774309595&comment_type=issue_comment" href="https://github.com/geany/geany/issues/2649#issuecomment-774309595">#2649 (comment)</a>).  But more reviews & tests are welcome of course.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany/pull/2747'>https://github.com/geany/geany/pull/2747</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Avoid redundant margin computation when creating a new Scintilla widget</li>
  <li>Aggressively cache line height for computing margin sizes</li>
  <li>Use plain comparison instead of naive hashing</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/2747/files#diff-3fe5ce523684a7fca311fab0d09542552fbe3a28ddaa20ebc5a65c1904bc5e02">src/editor.c</a>
    (18)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/2747/files#diff-cf7e999119814341b59fd3b5a53ecc46271cb20152349ae0a494e77958d2d5f6">src/sciwrappers.c</a>
    (39)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany/pull/2747.patch'>https://github.com/geany/geany/pull/2747.patch</a></li>
  <li><a href='https://github.com/geany/geany/pull/2747.diff'>https://github.com/geany/geany/pull/2747.diff</a></li>
</ul>

<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/pull/2747">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ52A6BF2HDP6LMTM5TS5T3HXANCNFSM4XGBDDQA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJ66JP6QQKTYM4BKLATS5T3HXA5CNFSM4XGBDDQKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4L6XLITA.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/pull/2747",
"url": "https://github.com/geany/geany/pull/2747",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>