These are chat archives for anacrolix/torrent

19th
Jun 2018
Matt Joiner
@anacrolix
Jun 19 2018 00:45 UTC
other clients don't provide streaming as far as i'm aware. they should only run into the redundant piece issue in what's called the "end game", where you double up requests to ensure you can finish quickly. using torrent.Reader you're essentially always in end game mode
@elgatito did you solve your hang? what does litter provide that spew didn't?
Matt Joiner
@anacrolix
Jun 19 2018 01:51 UTC
@elgatito have you tried the dev branch? i've made breaking changes renaming Config->ClientConfig because it's now recommended to call NewDefaultClientConfig
Denis
@elgatito
Jun 19 2018 04:23 UTC
@anacrolix not yet (for both questions). On some Windows (not all), getting a hang when dumping ClientConfig with DefaultStorage = NewFileStorage
it's a struct, nothing special, so i'm puzzled :)
@anacrolix dev branch is ready to test?
Matt Joiner
@anacrolix
Jun 19 2018 04:28 UTC
give it a spin
Denis
@elgatito
Jun 19 2018 04:33 UTC
@anacrolix https://github.com/tj/go-disk-buffer new packages arise. interesting to test with good bandwidth and hdd's
that is not exactly what we need, because package uses consequent writing
Denis
@elgatito
Jun 19 2018 04:38 UTC
in our case it should be probably something like a buffer of [N] chunks, which flushes on interval or N size
Matt Joiner
@anacrolix
Jun 19 2018 04:39 UTC
i think most of the overhead is actually in the file open and closing
Denis
@elgatito
Jun 19 2018 04:39 UTC
that time I tried to use persistent filehandles it was even worse. system or Go is probably managing all that
Matt Joiner
@anacrolix
Jun 19 2018 05:05 UTC
if there was an easy answer i would have done it :P
Denis
@elgatito
Jun 19 2018 05:05 UTC
sure
Matt Joiner
@anacrolix
Jun 19 2018 05:06 UTC
so if there's not, i do the simplest thing
Denis
@elgatito
Jun 19 2018 05:06 UTC
libtorrent implements buffered writer
Matt Joiner
@anacrolix
Jun 19 2018 05:06 UTC
mmapping is a super simple solution
are you using that?
Denis
@elgatito
Jun 19 2018 05:07 UTC
mmap?
Denis
@elgatito
Jun 19 2018 05:08 UTC
it is available in Elementum, but people say it's not helping when they have poor write speeds
Matt Joiner
@anacrolix
Jun 19 2018 05:08 UTC
ok
got a profile for the poor write speeds?
Denis
@elgatito
Jun 19 2018 05:09 UTC
pprof profile?
Matt Joiner
@anacrolix
Jun 19 2018 05:09 UTC
that should be the best one for it. or the /debug/perf when they have poor speeds
it should show a very high average or max
Denis
@elgatito
Jun 19 2018 05:23 UTC
there 's #234, but you see, people are silent
Denis
@elgatito
Jun 19 2018 09:50 UTC
# github.com/syncthing/syncthing/vendor/github.com/syncthing/notify
../../syncthing/syncthing/vendor/github.com/syncthing/notify/watcher_fsevents_cgo.go:10:10: fatal error: 'CoreServices/CoreServices.h' file not found
#include <CoreServices/CoreServices.h>
         ^
1 error generated.
that is when cross-compiling with cgo for iOS. I feel I will need to move upnp to a local package to avoid pulling all that huge library
Denis
@elgatito
Jun 19 2018 10:00 UTC
it's probably something missing in the xgo build script, because darwin compiles fine (when iOS does not), but still makes more trouble than help :)
Matt Joiner
@anacrolix
Jun 19 2018 11:14 UTC
hm
what we need is a standalone upnp implementation
i have no time to implement it myself
Denis
@elgatito
Jun 19 2018 11:14 UTC
i'm half way with upnp migration
separate repo outside /torrent ?
Denis
@elgatito
Jun 19 2018 11:22 UTC
Bootstrapping ios-8.1/arm-7...
Compiling for ios-8.1/arm-7...
# github.com/mattn/go-sqlite3
sqlite3-binding.c:31577:6: warning: "gethostuuid() is disabled." [-W#warnings]
Cleaning up Go runtime for ios-8.1/arm-7...
Cleaning up build environment...
awesome. finished moving upnp, it's not that much, when looking closer
they mostly do own logging and override net.dialer to support upnp behind proxy
Matt Joiner
@anacrolix
Jun 19 2018 11:26 UTC
can you make a PR of it?
Denis
@elgatito
Jun 19 2018 11:27 UTC
done
log messages now all come with log.Printf(), so spamming a bit
Matt Joiner
@anacrolix
Jun 19 2018 12:07 UTC
ah, i was thinking maybe make it a standalone repo
elgatito/nat
:P
Denis
@elgatito
Jun 19 2018 12:23 UTC
ha. not sure it makes sense since it's so small
Matt Joiner
@anacrolix
Jun 19 2018 12:23 UTC
lots of people wish upnp wasn't embedded in syncthing
we're not the first ones to link in
Denis
@elgatito
Jun 19 2018 12:24 UTC
you can make an empty repo so I can pr there :)
Matt Joiner
@anacrolix
Jun 19 2018 12:24 UTC
lol
Denis
@elgatito
Jun 19 2018 12:36 UTC
so what do you think?
Matt Joiner
@anacrolix
Jun 19 2018 12:45 UTC
would you prefer not to maintain it?
Denis
@elgatito
Jun 19 2018 12:45 UTC
everyone would prefer not to maintain something :D
but i'm finishing with own repo
will repost the PR
updated the PR
Matt Joiner
@anacrolix
Jun 19 2018 13:00 UTC
awesome
Denis
@elgatito
Jun 19 2018 13:19 UTC
now the ios builds are fine again
next version will ship for ios, xbox as well