Jordan Lee
f6d68844bd
(trunk libT) #4101 "RPC method blocklist-update is broken" -- add debugging error messages for cases where gzopen/gzread fails
2011-06-10 05:34:16 +00:00
Jordan Lee
0aa163dfe9
(trunk libT) #4295 "'download-dir-free-space' contains garbage" -- fixed by bugmenot patch
2011-05-30 18:17:16 +00:00
Jordan Lee
3f6ffb90c2
(trunk libt) #4301 "strerror used instead of tr_strerror -- fix in peer-io.c too
2011-05-30 15:50:50 +00:00
Jordan Lee
7f2e4084dc
(trunk libT) fix webseed issue reported by Alex Hartl
2011-05-29 14:59:00 +00:00
Jordan Lee
d6e39e4d2f
(trunk libT) #4284 "crash via webfrontend or transmission-remote" -- use patch from jerwied
2011-05-27 23:28:40 +00:00
Jordan Lee
dcf814a481
(trunk libT) #4283 "Remove 'Prefetch failed' error message" -- done.
2011-05-27 23:26:05 +00:00
Jordan Lee
33eb6d3f9e
(trunk) #3817 remove OS proxy integration from the GTK+ client
2011-05-27 13:36:53 +00:00
Jordan Lee
eb53352d40
fix an r12447 typo -- SoMud's two-letter prefix is SM, not SO
2011-05-20 18:00:57 +00:00
Jordan Lee
c453175e0e
(trunk libT) recognize a few more peer apps by name: Arctic, BitBuddy, GSTorrent, Hekate, Meerkat, SoMud, SymTorrent, TuoTu, and XSwifter
2011-05-20 17:55:48 +00:00
Jordan Lee
52512857ae
(trunk libT) better r12434
2011-05-16 07:11:21 +00:00
Jordan Lee
7cd9cc0176
(trunk libT) #4237 "tarnsmission-remote -l shows torrent list in reverse order" -- revert r12424 to fix this
2011-05-16 02:09:31 +00:00
Jordan Lee
a4ab013568
(trunk libT) fix magnet link crash in peer-msgs.c's updateDesiredRequestCount() reported by quinx in the forums.
...
In some odd cases (such as if unchoked without having shown interest), the code could dividing a number by the torrent's block size without checking to see if the torrent had its metadata yet. This caused a division by zero because a magnet torrent's blocksize is unset until the metadata is downloaded.
2011-05-12 06:43:40 +00:00
Jordan Lee
ddaaa92c31
(trunk libT) make allocateBandwidth()'s "priority" field const.
2011-05-11 21:09:31 +00:00
Jordan Lee
d32c5b36c7
(trunk libT) minor CPU improvement to peer-mgr.c's bandwidthPulse()
...
We looped through all the torrents 3x to do three separate tasks... instead, loop only once and do the three tasks inside the single loop.
2011-05-10 14:41:59 +00:00
Jordan Lee
ffba6a16bd
(trunk libT) oops, r12424 included a second CPU improvement patch that I had in the pipeline. Fix a typo in that patch.
2011-05-10 05:18:40 +00:00
Jordan Lee
94cc3f87f7
(trunk libT) CPU improvement in torrent.c's torrentInit()
...
Add the new torrent to the session's torrent list by prepending it instead of appending it. That way we don't have to walk the list in order to add it. tr_session.torrentList is an unordered list, so there's no real difference between prepending and appending.
2011-05-10 04:46:44 +00:00
Jordan Lee
3aaeaddbaf
(trunk libT) CPU optimization in peer-mgr.c's rechokeDownloads()
...
Instead of recalculating interesting pieces for each peer we loop through, calculate them just once into a bitfield and then reuse that bitfield inside the loop.
2011-05-10 03:50:54 +00:00
Jordan Lee
0b11909854
(trunk libT) small CPU optimization in bitfield.c's countRange()
2011-05-10 03:43:06 +00:00
Jordan Lee
6a38a368d6
(trunk libT) CPU improvement in peer-mgr.c's getPeerCandidates()
...
getPeerCandiates() used to read through all the torrents to determine the global peer connections, and then again to determine the global peer candidates. Now this is done in one loop instead of two.
2011-05-10 01:51:12 +00:00
Jordan Lee
3c3fda5c66
(trunk libT) CPU optimization in tr_bandwidthClamp().
...
Don't call tr_time_msec() if it's not necessary. This was one of the top CPU sinks in profiling, so removing it is a nice improvement in cases when it's not necessary, such as when speed limiting is disabled.
2011-05-09 04:16:49 +00:00
Jordan Lee
c0e1cd8007
(trunk libT) torrent-get CPU optimization.
...
Move the tr_torrentStat() call outside of the addField() loop so that it's only called once instead of N times.
2011-05-09 04:13:14 +00:00
Jordan Lee
3269d99287
(trunk libT) experimental fix for the unterminated announce URLs reported by blacklion in the forums
2011-05-05 20:41:09 +00:00
Jordan Lee
45669fed08
(trunk libT) #4227 "invalid URLs aren't filtered out of .torrents' webseed lists"
...
If we can't parse a URL provided in the .torrent files' webseed list, that URL should be discarded.
2011-05-05 03:10:51 +00:00
Jordan Lee
f8f02fe7c3
(trunk libT) #2338 "Add uTP support" -- increase the block bandwidth to 3000 bytes in phase 1 as suggested by jch in comment:120.
...
The rationale is that by using 3000 bytes we'll send one full-size frame straight away, and leave enough buffered data for the next frame to go out in a timely manner.
2011-05-04 21:38:01 +00:00
Jordan Lee
f5a0276332
(trunk libT) the functions tr_peerMsgsSetChoke() and tr_peerMsgsSetInterested() have bool arguments whose types never got switched from "int" to "bool" when "bool" was adopted.
2011-05-01 19:10:34 +00:00
Jordan Lee
50ceaafeb8
(trunk libT) very minor copyediting: remove a little unwanted whitespace
2011-04-30 00:08:24 +00:00
Jordan Lee
841bfffff8
(trunk libT) simplify the code in peer-mgr.c's rechokeDownloads().
...
The new code has fewer calls to malloc/free and, more importantly, has less copy-and-pasted code to handle the different rechoke states.
2011-04-29 23:25:12 +00:00
Jordan Lee
92ad42e10c
(trunk libT) #4215 "bug in unchoking algorithm" -- fixed.
2011-04-29 22:39:54 +00:00
Jordan Lee
513a3fcc1d
(trunk libT) tr_torrentGetFileMTime(): if the file being looked at is aleady open in fdlimit's file cache, use that cached handle instead of deriving our own.
2011-04-28 18:40:46 +00:00
Jordan Lee
e514f93fd1
(trunk libT) in peer-mgr.c's refillUpkeep(), allocate the temporary array outside of the loop instead of inside...
2011-04-28 17:46:31 +00:00
Jordan Lee
1bddadf1c6
(trunk libT) #4212 "excessive UDP logfile entries in debug mode" -- fixed.
2011-04-28 02:51:07 +00:00
Jordan Lee
2ecca714f1
(trunk libT) heap pruning: use tr_bencToBuf() instead of tr_bencToStr() when building LTEP messages. This saves us from a handful of unnecessary malloc+memcpy+free calls in each instance where the change is made.
2011-04-27 21:38:45 +00:00
Jordan Lee
c061390f65
(trunk libT) heap pruning: using the same mechanism as in r12388, avoid an unnecessary malloc+memcpy+free in tr_bencToFile()
2011-04-27 21:33:52 +00:00
Jordan Lee
c9b54799e3
(trunk libT) tweak the ABI of tr_bencToBuf() to match the way it's being used
2011-04-27 21:22:08 +00:00
Jordan Lee
6e99c6cd69
(trunk libT) heap pruning: using the same mechanism as in r12388, avoid an unnecessary malloc+memcpy+free when building the URL for a webseed download request
2011-04-27 20:52:07 +00:00
Jordan Lee
aa41779aaa
(trunk libT) heap pruning: using the same mechanism as in r12388, avoid an unnecessary malloc+memcpy+free when TR_CURL_VERBOSE is logging HTTP messages
2011-04-27 20:50:43 +00:00
Jordan Lee
5681ea73e2
(trunk libT) heap pruning: avoid unnecessary malloc+memcpy+frees in announcer.
...
1. when creating announce URLs in announcer-http.c
2. when creating scrape URLs in announcer-http.c
3. when deep-logging what announces are in a torrent's queue in announcer.c
2011-04-27 20:41:47 +00:00
Jordan Lee
2f95dd54e8
(trunk libT) heap pruning: lazy-allocate the array in peer-mgr.c's getPeersToClose().
2011-04-27 19:06:06 +00:00
Jordan Lee
118ea87fef
(trunk libT) more heap pruning: avoid an unnecessary evbuffer_new() + evbuffer_free() in tr_peerIoWriteBytes()
2011-04-27 17:52:28 +00:00
Jordan Lee
2043356876
(trunk libT) constify the tr_scrape_request argument to scrape_request_delegate().
2011-04-27 17:30:53 +00:00
Jordan Lee
dfcc14c3d5
(trunk libT) more heap pruning: build the "cookie_filename" field once when creating the web thread, instead of each time a new tr_web_task is added.
2011-04-27 17:02:18 +00:00
Jordan Lee
4ecf0d36d1
(trunk libT) use tr_malloc() instead of malloc() in tr_loadFile() and in the fallback code for tr_valloc()
2011-04-27 16:12:17 +00:00
Jordan Lee
018b673acd
(trunk libT) #4209 "Shortcut UDP tracker test" -- prioritize the UDP handler functions based on frequency (uTP, DHT, UTP tracker) as outlined by jch in comment:5. Also, don't call the uTP or DHT handlers when uTP or DHT is disabled in the system preferences.
...
To avoid the function call overhead described by jch, instead of calling tr_sessionIsUTPEnabled() and tr_sessionIsDHTEnabled(), we test for WITH_UTP to be defined and test the tr_session.isUTPEnabled and tr_session.isDHTEnabled flags directly.
2011-04-27 05:29:05 +00:00
Jordan Lee
ea3fe42ca3
(trunk libT) #4209 "Shortcut UDP tracker test" -- the goal of #4209 is to minimize the cost of the UDP event callback function, so apply the heap pruning eye to that by removing an unnecessary malloc/free call there.
...
Previously we allocated a 4096 character buffer each time; now we allocate it on the stack. It seems all the distros and OS flavors that Transmission runs on have multi-MB default stack sizes, so a hardwired 4K array should be safe.
2011-04-27 05:03:10 +00:00
Jordan Lee
0d31a32d41
(trunk libT) #4204 "Availability is the same as the amount downloaded when there are no seeders" -- possible fix
...
It looks like we had the wrong test on the replication count array size.
2011-04-24 22:56:42 +00:00
Juliusz Chroboczek
decbfef106
Optimise UDP dispatch ( fixes #4209 ).
...
Make quick inline tests for the DHT and UDP tracker protocols, which
avoids calling tau_handle_message for each µTP packet.
2011-04-24 19:12:28 +00:00
Jordan Lee
a8377b1b7a
(trunk libt) #4164 "__FD_SETSIZE impact on open-file-limit and peer-limit-global" -- commit patch by romanr to take FD_SETSIZE into account before calling setrlimit()
2011-04-19 15:23:04 +00:00
Jordan Lee
ab698d2fa4
(trunk libT) more heap pruning: don't allocate peer-msgs' incoming block buffer until it's needed. If we're seeding, we won't need it.
2011-04-17 06:13:22 +00:00
Jordan Lee
294c2d7113
(trunk libT) heap and event pruning: don't create evtimers for periodic pex messages if the torrent doesn't allow pex (such as, if it's on a private tracker).
...
Previously, we unconditionally created the evtimer, and then checked each time to see if pex was allowed.
2011-04-17 05:55:46 +00:00
Jordan Lee
244bd7bc1c
(trunk libT) more heap pruning: use composition rather than aggregation for the tr_crypto object owned by tr_peerIo.
2011-04-17 05:22:50 +00:00