commit 55922182ebf8ddce9bcdd111e24a504549f91259 from: David Scott date: Tue Nov 24 20:56:43 2015 UTC p9p: remove per-message logging Printing all requests and responses to the log is quite expensive, especially when sending megabytes of data through 9P. This patch leaves the logging in the error paths and the flush path. Signed-off-by: David Scott commit - f738d8a811c3a647540ab27a5156fdf05d2f64d2 commit + 55922182ebf8ddce9bcdd111e24a504549f91259 blob - 0fcc697f7bb6326693044b9145f9080a391864f4 blob + 93556e57cc2d976b5d72331d29ca1e6a42748333 --- channel.go +++ channel.go @@ -148,7 +148,6 @@ func (ch *channel) ReadFcall(ctx context.Context, fcal if err := ch.codec.Unmarshal(ch.rdbuf[:n], fcall); err != nil { return err } - log.Println("channel: recv", fcall) return nil } @@ -160,7 +159,6 @@ func (ch *channel) WriteFcall(ctx context.Context, fca return ErrClosed default: } - log.Println("channel: send", fcall) deadline, ok := ctx.Deadline() if !ok { blob - db99d90caebaa4a7090817bb8d7114815121e554 blob + 24d78b3be3d6009581e39ed6283df08d6e6dd118 --- server.go +++ server.go @@ -78,10 +78,8 @@ func (c *conn) serve() error { log.Println("server.run()") for { - log.Println("server:", "wait") select { case req := <-requests: - log.Println("request", req) if _, ok := tags[req.Tag]; ok { select { case responses <- newErrorFcall(req.Tag, ErrDuptag): @@ -149,7 +147,6 @@ func (c *conn) serve() error { }(ctx, req) } case resp := <-completed: - log.Println("completed", resp) // only responses that flip the tag state traverse this section. active, ok := tags[resp.Tag] if !ok {