You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yt-dlc/youtube_dlc
Jody Bruchon ecdec1913f Keep download archive in memory for better performance
The old behavior was to open and scan the entire archive file for
every single video download. This resulted in horrible performance
for archives of any remotely large size, especially since all new
video IDs are appended to the end of the archive. For anyone who
uses the archive feature to maintain archives of entire video
playlists or channels, this meant that all such lists with newer
downloads would have to scan close to the end of the archive file
before the potential download was rejected. For archives with tens
of thousands of lines, this easily resulted in millions of line
reads and checks over the course of scanning a single channel or
playlist that had been seen previously.

The new behavior in this commit is to preload the archive file
into a binary search tree and scan the tree instead of constantly
scanning the file on disk for every file. When a new download is
appended to the archive file, it is also added to this tree. The
performance is massively better using this strategy over the more
"naive" line-by-line archive file parsing strategy.

The only negative consequence of this change is that the archive
in memory will not be synchronized with the archive file on disk.
Running multiple instances of the program at the same time that
all use the same archive file may result in duplicate archive
entries or duplicated downloads. This is unlikely to be a serious
issue for the vast majority of users. If the instances are not
likely to try to download identical video IDs then this should
not be a problem anyway; for example, having two instances pull
two completely different YouTube channels at once should be fine.

Signed-off-by: Jody Bruchon <jody@jodybruchon.com>
4 years ago
..
downloader [skip travis] renaming 4 years ago
extractor [hotstar] regex fix 4 years ago
postprocessor Merge branch 'ext/remuxe-video' of https://github.com/Zocker1999NET/youtube-dl into Zocker1999NET-ext/remuxe-video 4 years ago
YoutubeDL.py Keep download archive in memory for better performance 4 years ago
__init__.py [Core] hls manifests, dynamic mpd 4 years ago
__main__.py [skip travis] renaming 4 years ago
aes.py [skip travis] renaming 4 years ago
cache.py [skip travis] renaming 4 years ago
compat.py [skip travis] renaming 4 years ago
jsinterp.py [skip travis] renaming 4 years ago
options.py [Core] hls manifests, dynamic mpd 4 years ago
socks.py [skip travis] renaming 4 years ago
swfinterp.py [skip travis] renaming 4 years ago
update.py [skip travis] renaming 4 years ago
utils.py Merge branch 'ytdl-org-master' 4 years ago
version.py bump version 2020.09.16 4 years ago