On Monday 25 November 2013, Aurélien Gâteau wrote: > Le lundi 25 novembre 2013 13:54:38 Mark Gaiser a écrit : > > On Mon, Nov 25, 2013 at 10:45 AM, Aurélien Gâteau wrote: > > > Le dimanche 24 novembre 2013 19:42:25 Mark Gaiser a écrit : ... > > >> What should be done is detecting is the target is mounted via a slow > > >> connection. So if it's mounted via the internet then "probablySlow" > > >> should return true. On the other hand, i don't know if such checks are > > >> in place and if they are not there, how to implement them. > > > > > > Would be nice, but sounds difficult to do reliably, especially without > > > generating too much traffic. > > > > I doubt that. > > If you do a ping or those kind of network tricks to figure out it's > > speed. Then yes, it will cause some traffic. And i don't think you > > should go for that. > > > > What is possible - technically - is detecting if the connection is > > made through a wired internet connection, local network connection or > > even the same with wireless. Based on the "connection speed" that > > NetworkManager is just showing you, you can make a first guess if the > > connection is slow or fast. If you connect to an ip within the local > > IP ranges (10.x.x.x, 192.168.x.x etc..) then you can assume a fast > > local connection. Sure, that doesn't "need" to be true because you can > > also have VPN setups where ip's might seem local, but are in fact > > connected through the internet. There is no way to figure that out in > > a sane manner so they would have "false positives". That doesn't > > matter much. Those are the exceptions anyway. For other connections > > you can first do an nslookup (or trace route) to see if they are local > > or remote. Even then you can - yet again - argue that it's not going > > to work if you have a local dns server.. Again not important because > > those are the exceptions. > > Sounds quite complicated: what about adding what Albert suggests until you > are done with writing this slow-network detection code? hmm, doesn't have to be really complicated, just a little bit more sophisticated than it is now, e.g. like the following, which is not too hard to do: probablySlow = (NFS || CIFS) && (host is not in my own subnet || NIC is wireless) Alex