Github user robertkowalski commented on the pull request:
https://github.com/apache/couchdb-couch/pull/57#issuecomment-113898189
@janl the problem is the formatting in lager, which is slow (see
https://github.com/apache/couchdb-lager/blob/215c425d091aec61c33f9920aa76d035733b1cde/src/lager.erl#L350-353)
-- you can also see in the flamegraph that the time is spent on
`lager:safe_format/4` which calls `lager:trunc_io_format/4`
@kxepal @janl When I grep the sourcecode for `couch_log:notice` every call
uses an own custom formatting and `couch_log:notice` then delegates to `lager`
which decides if it uses its own formatter or not. I don't see why the patch
blocks https://issues.apache.org/jira/browse/COUCHDB-1278 and
https://issues.apache.org/jira/browse/COUCHDB-1401 -- given someone really
wants to implement it at some point, but to be honest I don't see many people
working on that or even talking about it.
Conclusion:
- I think 4% speed improvement is quite a big deal.
- I don't see why it blocks another log format, can you elaborate with
constructive feedback please?
- I am implementing for my needs **now**, not the ones **I might have in
the future**. I don't see many people working on a new log format and given
that the tickets are around 4 years old they *might* not have any priority *any
more* or at least *right now* -- but to repeat: I don't see why it would block
potential work and I am looking forward to your constructive feedback
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---