This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author joshtriplett
Recipients joshtriplett
Date 2020-12-31.22:14:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1609452860.68.0.697253388073.issue42799@roundup.psfhosted.org>
In-reply-to
Content
fnmatch translates shell patterns to regexes, using an LRU cache of 256 elements. The documentation doesn't mention the cache size, just "They cache the compiled regular expressions for speed.". Without this knowledge, it's possible to get pathologically bad performance by exceeding the cache size.

Please consider adding documentation of the cache size to the module documentation for fnmatch, along with a suggestion to use fnmatch.translate directly if you have more patterns than that.
History
Date User Action Args
2020-12-31 22:14:20joshtriplettsetrecipients: + joshtriplett
2020-12-31 22:14:20joshtriplettsetmessageid: <1609452860.68.0.697253388073.issue42799@roundup.psfhosted.org>
2020-12-31 22:14:20joshtriplettlinkissue42799 messages
2020-12-31 22:14:20joshtriplettcreate