You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by 尹声凯 <yi...@xiaomi.com.INVALID> on 2023/03/13 07:01:14 UTC

Remove CRLF conversion in ramlog

Hello everyone:

I submitted a PR(https://github.com/apache/nuttx/pull/8755) to remove CRLF conversion in ramlog, which is unnecessary in ramlog and causes extra overhead.
After removing the CRLF check, I will use memcpy instead of byte-by-byte copy, which will bring a large performance improvement.

Carriage returns are already discarded in libs/libc/stream/lib_syslogstream.c:152, and double checks will bring additional overhead.

Here's how long it took me to test syslog 100 times:
Original time: 1924us
Remove CRLF time: 1918us
Using memcpy time: 1094us

Let me know if you find any other issues, thanks!


Best regards,

Yin Shengkai

#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#