Massive reduction in performance after 1.5.0
See original GitHub issueDescribe the bug
After the 1.5.0 release, there appears to have been a significant reduction in performance. For instance, here is the output of time bandit -r . using 1.4.0:
17.56user 2.12system 0:21.22elapsed 92%CPU (0avgtext+0avgdata 90712maxresident)k
182728inputs+0outputs (0major+45973minor)pagefaults 0swaps
And here it is with 1.5.0:
261.46user 3.96system 4:27.26elapsed 99%CPU (0avgtext+0avgdata 89164maxresident)k
362728inputs+0outputs (8major+45690minor)pagefaults 0swaps
To Reproduce Steps to reproduce the behavior:
- Run time bandit -r .within a medium to large-size project on 1.4.0
- Note the time.
- Run the same command again, but with bandit 1.5.0
- Compare the two times. You should see a significant drop in performance
Expected behavior Performance consistent or comparable with 1.4.0
Bandit version
bandit 1.5.0
  python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
Issue Analytics
- State:
- Created 5 years ago
- Comments:19 (9 by maintainers)
 Top Results From Across the Web
Top Results From Across the Web
Anyone seeing lower FPS post patch 1.5 on PC with ray tracing?
Hello guys, Same fps drop here. I think i find the reason. After patch 1.5 my CPU is now at 100% usage very...
Read more >FPS in 1.5, page 1 - Forum - GOG.com
Mh, performance seems to have improved a bit for me over time. In the city center I get 50-60 FPS with ultra ray...
Read more >Suddently slower performance and fps drop on my XPS 15 ...
After the exams i re-downloaded some games, then i figured a huge fps drop. From the initials 100 fps it dropped to 35...
Read more >Cyberpunk 2077 1.5 PC PATCH FSR | GTX 1050 ti - YouTube
#cyberpunk #cyberpunk2077. Cyberpunk 2077 1.5 PC PATCH FSR | GTX 1050 ti | 1650 SUPER | RX 570 | PC Performance Test.
Read more >Oracle Critical Patch Update Advisory - January 2022
Oracle Communications Instant Messaging Server, version 10.0.1.5.0 ... This Critical Patch Update contains 2 new security patches for Oracle Big Data Graph.
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Reddit Thread
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

I just check the function fnmatch on python core and it was changed: https://github.com/python/cpython/blob/2.7/Lib/fnmatch.py#L69 https://github.com/python/cpython/blob/3.4/Lib/fnmatch.py#L64
Changed on the commit: https://github.com/python/cpython/commit/5b0c1e07ca169feced6d6458f80c2b9ccc6227e0#diff-b62de5c6bce57a277ae7bc60324011ec
A quick test I did was just changing this line:
From
To
and I went from 14m48.641s to 0m20.871s while removing 1 false positive. Given that it seems like regex matching should be optional and not the default? I will certainly monkey-patch the definition on our end.