-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
考虑支持 tokio 和 async-std ? #8
Comments
由于fast_log 使用异步库只处理 通道接受日志,并处理后续Appender的IO事件(打印日志,发送日志到网络IO....)等等, 更换tokio(而且是建立在使用tokio的单线程Runtime 模拟Actor运行时)诚然能提高稍多的并发,但是代价是单协程的延迟增高。但是我们打印日志基本都是不超过5条协程在工作。 保持简单,高性能即可 |
因为这边使用很多东西包括 Web 服务 rweb 都是基于 tokio 的。换 runtime 不实际。这个库也是可以正常用的。只是担心同时跑两个 runtimes 会不会有问题呢? |
不影响你的。 |
实际上还是有影响的呢。我的机子是 8 核 8 线程的。运行只有 tokio 的程序有 9 全线程。加上这个库后变成 20 个线程了呢。
下面是没有启用 Log 的。
|
may默认是cpu*2线程,你可以设置它为2线程(至少)。 |
看到这里使用的是 may 这个运行库。有没有考虑支持 tokio 和 async-std 呢?
The text was updated successfully, but these errors were encountered: