Files
gallery-dl/gallery_dl
Jan Wikholm 06d102f19a optimize _find_most_recently_used_file for exact profile
When reading cookies from the browser, the user is able to give either just the browser name, or also provide profile/container information.

If an exact profile is provided, there is no need to find the latest profile with `os.walk` which is very expensive.

This change optimizes that case and the performance increase is significant (~8 sec to 0.6 sec).

```
$ time gallery-dl --config-ignore -d . -D . --cookies-from-browser FIREFOX https://imgur.com/OO4UNqJ
[cookies][info] Extracted 16 cookies from Firefox
 ./imgur_OO4UNqJ.jpg

real    0m8.429s
user    0m0.216s
sys     0m0.431s

$ time gallery-dl --config-ignore -d . -D . --cookies-from-browser FIREFOX:bgamf5r6.default-release https://imgur.com/OO4UNqJ
[cookies][info] Extracted 16 cookies from Firefox
 ./imgur_OO4UNqJ.jpg

real    0m0.456s
user    0m0.183s
sys     0m0.011s

$ gallery-dl --version
1.26.9
```
2024-05-02 18:16:13 +02:00
..
2023-08-21 23:46:39 +02:00
2021-10-13 04:07:41 +02:00
2023-08-21 23:46:39 +02:00
2024-02-24 00:04:24 +01:00
2023-12-18 23:57:22 +01:00
2024-04-20 20:51:20 +02:00
2024-04-13 18:51:40 +02:00