Re: [PATCH v7 04/16] trace: improve trace performance

2014-07-02 Thread Junio C Hamano
Karsten Blees writes: > Replace the 'const char *key' parameter in the API with a pointer to a > 'struct trace_key' that bundles the environment variable name with > additional, trace-internal state. Change the call sites of these APIs to > use a static 'struct trace_key' instead of a string cons

[PATCH v7 04/16] trace: improve trace performance

2014-07-01 Thread Karsten Blees
The trace API currently rechecks the environment variable and reopens the trace file on every API call. This has the ugly side effect that errors (e.g. file cannot be opened, or the user specified a relative path) are also reported on every call. Performance can be improved by about factor three by