<p></p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/xiota/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/xiota">@xiota</a> running a test in a tight loop like that the inode <em>will</em> be cached by Linux, and probably even by windows (although its file operations are notoriously slower than Linux) all you are testing is the cost of the allocate for the string concat and the stat system call to copy existing data, not the cost to access the file system.  This is confirmed when I run the same test on a memory filesystem, an SSD filesystem and a spinny hard disk filesystem and get the same answer.</p>
<p>But when the calls are not in the same closed loop the caching may not happen so well, or even not at all with some mount options.</p>
<p>And for a remote file on a network (where the default is to ask for new metadata if the requests are more than 3 secs apart) there could be intermittent delays while typing.</p>
<p>Since the cost is incurred only when the plugin is enabled, ultimately the decision is up to the the plugin maintainer, Geany doesn't really care.</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-plugins/pull/1112#issuecomment-933941543">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ4XPEGVPAFC7MHLXR3UFI4W3ANCNFSM5ENCRBVA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJ5C6FKPOUOOLZAWYHLUFI4W3A5CNFSM5ENCRBVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG6VNCJY.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-plugins/pull/1112#issuecomment-933941543",
"url": "https://github.com/geany/geany-plugins/pull/1112#issuecomment-933941543",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>