<p></p>
<blockquote>
<p dir="auto">Knowing the (semi-related) code for the documents list pretty good by now (courtesy of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="306542123" data-permission-text="Title is private" data-url="https://github.com/geany/geany/issues/1812" data-hovercard-type="issue" data-hovercard-url="/geany/geany/issues/1812/hovercard" href="https://github.com/geany/geany/issues/1812">#1812</a>) I don't think it's that bad</p>
</blockquote>
<p dir="auto">That code is for babies really ;-).</p>
<p dir="auto">The symbol tree code spans from line 260 to line 1260 in symbols.c. It doesn't re-create the tree when something changes like the documents list - it really updates the tree by first removing invalid entries and then adding new entries, otherwise the tree would scroll all the time when you add or remove something that generates a tag. Multiple hash tables are involved in constructing it to detect the changes. If there's one piece of code to fear in Geany, it's the symbol tree code (followed by scope autocompletion). I already did some things in the past with the symbol tree to optimize it and developed quite a bit of respect to it - it works, it's very fragile because even small changes tend to break it, and better not to touch it much.</p>
<p dir="auto">In any case, anyone brave enough is encouraged to improve it :-).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3172#issuecomment-1101421500">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ2AYJTS543I6K4UQG3VFVRUFANCNFSM5TT6KYJA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJ36KIUKGEUUNGDZEWTVFVRUFA5CNFSM5TT6KYJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIGTFXPA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><geany/geany/pull/3172/c1101421500</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3172#issuecomment-1101421500",
"url": "https://github.com/geany/geany/pull/3172#issuecomment-1101421500",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>