syncthing/lib/protocol
greatroar bd0acd04b1
lib/protocol: Use one mutex for rawConnect.awaiting and nextID (#8198)
Having a separate mutex for the three or four instructions needed to
fetch and increment nextID means the overhead exceeds the cost of this
operation.  nextID is now handled inside the critical section for
awaiting instead, while the more expensive channel creation has been
moved outside it.

This is mostly a simplification, though it may have minor performance
benefits in some situations. The single-threaded sender benchmark shows
no significant difference:

name               old speed      new speed      delta
RequestsRawTCP-8   55.3MB/s ± 7%  56.6MB/s ± 6%   ~     (p=0.190 n=10+10)
RequestsTLSoTCP-8  20.5MB/s ±20%  20.8MB/s ± 8%   ~     (p=0.604 n=10+9)
2022-02-28 09:13:30 +01:00
..
mocks lib/connections: Trigger dialer when connection gets closed (#7753) 2021-06-17 13:57:44 +02:00
LICENSE Add 'lib/protocol/' from commit 'f91191218b192ace841c878f161832d19c09145a' 2015-09-22 19:34:29 +02:00
benchmark_test.go lib: Handle adding enc folders on an existing conn (fixes #7509) (#7510) 2021-03-22 21:50:19 +01:00
bep.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
bep_extensions.go lib/protocol: Ensure correct blocksize on enc. fileinfo (ref #7861) (#7870) 2021-08-04 23:12:01 +02:00
bufferpool.go Fix bufferpool puts (ref #4976) (#6125) 2019-11-06 10:53:10 +00:00
bufferpool_test.go Fix bufferpool puts (ref #4976) (#6125) 2019-11-06 10:53:10 +00:00
common_test.go lib: Handle adding enc folders on an existing conn (fixes #7509) (#7510) 2021-03-22 21:50:19 +01:00
compression.go all: Move remaining protos to use the vanity plugin (#7009) 2020-10-02 08:07:05 +02:00
compression_test.go all: Move remaining protos to use the vanity plugin (#7009) 2020-10-02 08:07:05 +02:00
conflict_test.go lib/db: Refactor to use global list by version (fixes #6372) (#6638) 2020-05-30 09:50:23 +02:00
counting.go all: Add comment to ensure correct atomics alignment (fixes #5813) 2019-07-13 14:05:39 +01:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
deviceid.go lib/protocol: Remove unused sorting boilerplate 2021-11-27 15:35:07 +01:00
deviceid_test.go lib: Use counterfeiter to mock interfaces in tests (#7375) 2021-03-03 08:53:50 +01:00
deviceid_test.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
doc.go Add 'lib/protocol/' from commit 'f91191218b192ace841c878f161832d19c09145a' 2015-09-22 19:34:29 +02:00
encryption.go lib/protocol: Preserve sequence decrypting fileinfos (fixes #7994) (#7995) 2021-10-06 10:26:54 +02:00
encryption_test.go lib/protocol: Preserve sequence decrypting fileinfos (fixes #7994) (#7995) 2021-10-06 10:26:54 +02:00
errors.go lib/protocol: Simplify codeToError, errorToCode 2021-10-22 18:40:40 +02:00
hello.go lib/discover, lib/protocol: Buffer allocation 2021-09-06 15:30:56 +02:00
hello_test.go all: Even more boring linter fixes (#5501) 2019-02-02 11:45:17 +01:00
luhn.go lib/protocol: faster Luhn algorithm and better testing (#6475) 2020-03-29 22:28:04 +02:00
luhn_test.go lib/protocol: faster Luhn algorithm and better testing (#6475) 2020-03-29 22:28:04 +02:00
mocked_connection_info_test.go lib: Use counterfeiter to mock interfaces in tests (#7375) 2021-03-03 08:53:50 +01:00
nativemodel_darwin.go lib/protocol: Eliminate nativeModel on Unix 2021-10-22 18:40:40 +02:00
nativemodel_unix.go lib/protocol: Eliminate nativeModel on Unix 2021-10-22 18:40:40 +02:00
nativemodel_windows.go lib/protocol: Eliminate nativeModel on Unix 2021-10-22 18:40:40 +02:00
nativemodel_windows_test.go lib/model, lib/protocol: Handle request concurrency in model (#5216) 2018-11-13 08:53:55 +01:00
protocol.go lib/protocol: Use one mutex for rawConnect.awaiting and nextID (#8198) 2022-02-28 09:13:30 +01:00
protocol_test.go lib/protocol: Require at least 3.125% savings from compression (#8133) 2022-01-24 19:36:58 +01:00
vector.go lib/db, lib/protocol: Never need empty-version entries (fixes #6961) (#6962) 2020-09-07 20:18:25 +02:00
vector_test.go lib/protocol: Avoid data loss on database wipe by higher version numbers (fixes #3876) (#6605) 2020-05-06 08:47:02 +02:00
wireformat.go all: Add untrusted folders behind feature flag (ref #62) (#7055) 2020-11-09 15:33:32 +01:00