Short-circuit 'easy' rglob/glob patterns#276
Conversation
|
@pjbull friendly ping :) |
|
Thanks @Gilthans, while I think this fix looks directionally reasonable, but I'd like to do a bit more investigation on why performance is bad in #274. I assumed that it was because there was a network call somewhere in the glob path, but we actually only call the list dir once here: cloudpathlib/cloudpathlib/cloudpath.py Lines 349 to 358 in b7f6010 If you get a chance, could you do some profiling and report in #274? I'm hoping there may be a better more general fix than the short circuit if this isn't networking related (or maybe it is and I just missed where the call is in my scan of the code). |
I actually came to the same conclusion before opening the issue. I got that far into the code and couldn't figure out why it was slow either. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 276-live-tests #276 +/- ##
================================================
- Coverage 94.8% 94.4% -0.4%
================================================
Files 20 20
Lines 1314 1323 +9
================================================
+ Hits 1246 1250 +4
- Misses 68 73 +5
🚀 New features to boost your workflow:
|
Resolves #274