Commit Graph

200 Commits

Author SHA1 Message Date
arvidn bdee0b563c fix suggest_read_cache setting 2020-02-02 20:16:59 +01:00
arvidn a53d090313 fix handling of torrents with too large pieces 2019-11-25 02:46:55 +01:00
arvidn 9b1607a63c fix updating of is_finished torrent status, when changing piece priorities 2019-09-07 10:45:25 +02:00
arvidn 07ab3b9739 add feature to create an affinity to pick adjecent pieces aligned to 4MiB extents. It's an attempt to improve disk I/O, by writing larger contiguous ranges of bytes. It's off by default. 2019-08-17 12:32:47 +02:00
arvidn 7103b12cb7 remove typed_span type 2018-11-17 00:43:58 +01:00
arvidn 69485558ef factor out duplicate code in piece_picker, upnp and lazy_bdecode 2018-11-10 15:17:57 +01:00
Arvid Norberg 761384bcf1 minor piece picker cleanup 2018-10-05 10:58:09 +02:00
arvidn c9cbb122e2 fix some warnings from sonar-cube 2018-09-05 18:10:57 -07:00
arvidn 37d85ac2f7 improve piece picker performance in tracking pad-blocks 2018-08-20 17:13:20 +02:00
arvidn 058419a77c simplify total_have/have_want/total_want. make piece_picker track pad blocks and compute byte-progress at block granularity 2018-08-19 22:21:24 +02:00
arvidn d55200af9d minor simplification of bytes_left(), remove quantized_bytes_done() 2018-08-11 08:29:45 +02:00
arvidn f1d2105afb remove dead code from piece picker 2018-08-08 23:41:46 +02:00
arvidn f0227451a6 merged RC_1_1 into master 2018-04-13 01:47:41 +02:00
arvidn aaf9304a3b update year in copyright header 2018-04-09 09:04:33 +02:00
arvidn 67bbb82122 improve type-safety in piece picker, by introducing a type for download queue index, for pieces 2018-03-24 23:03:09 +01:00
arvidn 5413eae900 declare tag types in-line 2018-03-23 11:21:08 +01:00
Alden Torres 6e5177beaf more code cleanup, typos, minor refactor in headers (#2795) 2018-02-18 00:36:57 +01:00
arvidn 50a293730b merged RC_1_1 into master 2018-01-29 10:20:45 +01:00
arvidn 9ac394f5b0 turn piece picker option flags into a proper type 2018-01-29 03:01:17 +01:00
arvidn ca3ea591df fix pad-file scalability issue 2018-01-29 03:00:37 +01:00
arvidn 0378ae47f4 fix some macro expansions of 'max' in headers, to improve compatibility with windows.h 2017-11-12 23:01:47 +01:00
arvidn 6785046c2f introduce a download_priority_t type, for uniform an type-safe piece- and file priorities 2017-11-02 08:20:21 +01:00
arvidn 50bef25786 make the piece-picker less two-phase initialized 2017-10-26 23:39:15 +02:00
arvidn 68f05d6380 fix some warnings and integer overflow with torrents that are too big 2017-09-28 14:59:28 -07:00
arvidn c66f4cc62a fix some warnings, mostly 0 -> nullptr 2017-09-28 07:33:10 -07:00
arvidn 6b1037eff5 convert enum values that are just used as constants, to actual constants with the correct type 2017-08-04 15:23:20 +02:00
arvidn 330904f460 convert picker_flags_t to type safe flags 2017-07-23 09:29:25 -07:00
Pavel Pimenov de369451b1 fix operator() ==, add const (#2063) 2017-06-10 08:18:32 +02:00
arvidn 480bde9333 change formatting of namespace declarations 2017-04-12 14:26:35 -04:00
Arvid Norberg 8cf6e9e37c use span<> to return the block_info for a piece (#1777)
use span<> to return the block_info for a piece to improve range checks and loops
2017-03-04 23:45:07 -05:00
Alden Torres 533699bbb5 making strong_typedef::UnderlyingType constexpr and warnigs cleanup 2017-01-26 16:32:30 -05:00
Alden Torres a5825c0d2e fixing sign-conversion warnings, part 5, minor refactor (#1559)
fixing sign-conversion warnings, part 5, minor refactor
2017-01-16 21:51:49 -05:00
Arvid Norberg f1e34dfbd5 remove long-standing deprecated filter_pieces functions (#1457)
remove long-standing deprecated filter_pieces functions
2016-12-27 12:42:23 -08:00
Arvid Norberg 42a27b3ebc introduce a prio_index_t type (#1453)
* introduce a prio_index_t type for indexing into the priority sorted piece list, m_pieces, in piece_picker

* some piece picker simplification

* fix msvc warning for prio_index_t
2016-12-26 08:25:50 -08:00
Arvid Norberg 3f1084d63d strengthened type safety in handling of piece and file indices (#1409)
strengthened type safety in handling of piece and file indices
2016-12-22 10:42:33 -05:00
arvidn 6267984e5e piece picker fix 2016-11-30 01:34:10 -05:00
arvidn 09b5cfd688 remove build option to use narrower types in piece_picker (optimize_memory_usage) 2016-11-29 08:11:51 -05:00
Alden Torres d5c4cd7280 fixed sign-compare warnings and some refactor (#1354)
fixed sign-compare warnings and some refactor. make sequence_number backed by std::int64_t
2016-11-27 08:46:53 -05:00
Alden Torres a59350687a fixed a few warnings related to signed/unsigned conversions (#1338)
fixed a few warnings related to signed/unsigned conversions
2016-11-19 21:14:16 -05:00
Arvid Norberg 5f3c52f406 transition to more default member initializers (#1261) 2016-10-26 20:41:57 -04:00
Arvid Norberg 20f65946f2 make single-argument constructors explicit (#1194)
make single-argument constructors explicit
2016-10-08 14:07:11 -04:00
Arvid Norberg d2002c5248 separate piece_block and has_block out to their own headers (#1148) 2016-09-24 08:46:56 -07:00
Alden Torres c05e29c48e trivial cleanup and minor changes (#1033) 2016-08-26 00:14:11 -04:00
Arvid Norberg e9a7271aca add piece picker test for re-prioritizing downloading/writing/partial pieces (#989)
add piece picker test for re-prioritizing partial pieces and forward port steven's piece picker fix from RC_1_1
2016-08-07 16:05:20 -04:00
Arvid Norberg 71f5510d62 make the random function produce proper random distributions, based o… (#981)
make the random function produce proper random distributions, based on uniform_int_distribution of C++11. also clean up piece_picker's priority_range to return two results instead of taking pointers to out-parameters. fix recent pe-crypto regression exposed by this change
2016-08-06 13:18:48 -04:00
Arvid Norberg caa034b1ac fix typo and add invariant check to piece_picker (#977)
fix typo and add invariant check to piece_picker
2016-08-02 07:20:13 -04:00
Arvid Norberg 6aabe3762b general modernization (#836)
general modernization. use nullptr instead of NULL, use std::tuple instead of boost::tuple, transition some unordered set/map from boost to std. some clean-up of includes
2016-06-20 11:32:06 -04:00
Arvid Norberg ed077c8358 use cstdint intead of boost/cstdint.hpp (#833)
use cstdint intead of boost/cstdint.hpp
2016-06-18 14:01:38 -04:00
Arvid Norberg 748af6eec1 general cleanup. remove valgrind markup, log_hash_failures and C headers (#752)
general cleanup. remove valgrind markup, log_hash_failures and C headers
2016-05-23 08:15:39 -04:00
Arvid Norberg e8380e1d0b factor out includes from config.hpp into the files actually using it. primarily, printf family of functions, since C++11 version is used now. This removes the need for an snprintf-wrapper on windows (#732) 2016-05-17 09:24:06 -04:00