github gotd/td v0.167.1

one hour ago

client.Download is now about 10 times faster: it downloads through the client's file pools on media-only DC addresses, several parts at a time.

Features

client.Download through FileDC (#2011)

  • File parts go through Client.FileDC of the home DC, which follows FILE_MIGRATE to the DC of the file and uses its media-only addresses where the config lists them. Before, they went over the primary connection, where Telegram limits downloads to about 5 MiB/s per account.
  • Parallel and ToPath keep Options.FilePoolSize parts in flight by default (4), one per pool connection; WithThreads still sets it. Before, one part was in flight. Stream stays sequential.
  • Measured on production, a 1211 MiB file, default settings: 3.7 MiB/s on v0.167.0, 40.9 MiB/s now (48.1 with FilePoolSize 16).
  • Options.FileDCRegularOnly keeps the old behaviour.

Fixes

  • Tests: pools of migration test clients are closed on cleanup, fixing a data race under -race (#2011).

Full Changelog: v0.167.0...v0.167.1

Don't miss a new td release

NewReleases is sending notifications on new releases.