HttpURLConnection docs said:Each HttpURLConnection instance is used to make a single request but the underlying network connection to the HTTP server may be transparently shared by other instances. Calling the close() methods on the InputStream or OutputStream of an HttpURLConnection after a request may free network resources associated with this instance but has no effect on any shared persistent connection.
Another idea from position of mostly ignorance: how about connections between kolmafia and the relay browser? Would keep-alive (initiated by the browser, but accepted by mafia) have any measurable good effect there?
How does the handshake overhead compare between local connections (comparably high bandwidth) and internet connections (*DSL, so in the megabits/second)?
The handshake in question here is between your local machine and the KoL server. So each request had a handshake overhead before it could proceed - a full roundtrip PING/PONG, basically. The issue is not one of bandwidth (miniscule) but of latency and responsiveness.
My original point was that if Mafia acted purely as a forwarding proxy (which it doesn't), then it'd hand packets to the browser as soon as it got them from KoL (which might be limited to 1500), so it wouldn't be able to take advantage of a higher MTU. I know Mafia doesn't do this if a relay script is active; I'm not sure about the converse, although I'd guess this behavior doesn't change -- I assume that Mafia always waits for the entire page before passing it off to the relay browser, in which case it might make the tiniest (read: negligible) difference to use something larger than 1500. Granted, this is purely speculative on my part (regarding Mafia's inner workings), so take it with a grain of salt.
Mafia decorates pages even without relay scripts. I assume it *always* gets the whole page first, then parses (and decorates) it, and only then starts sending data to relay browser - which can be source of a great *perceived* lag (page starts displaying noticeably later; but total time until page is completely rendered is not that much higher).