New GitHub issue #94436 from iritkatriel:<br>

<hr>

<pre>

When linecache doesn't find a source file or fails to read it due to OSError, SyntaxError or UnicodeDecodeError, it returns an empty result. In subsequent attempts it would try to find and read the file again. 

We should instead cache the negative lookup result and bypass the search in future queries. 


</pre>

<hr>

<a href="https://github.com/python/cpython/issues/94436">View on GitHub</a>
<p>Labels: performance</p>
<p>Assignee: iritkatriel</p>