-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Streaming Warehouse#save() #64
Conversation
Current:
This PR:
|
I'll do another round of benchmark. |
I have run a benchmark:
(Cold Processing / Hot Processing) I think it is ok to go. |
@SukkaW |
Hexo 4.0:
This PR:
(Cold Processing / Hot Processing) |
Ran benchmark on Travis, using hexo.io as test website. Current master branch:
This PR:
Even including SukkaW's result, I feel the differences in performance and memory consumption are within margin of error. Anyhow, this PR introduces backpressure detection, (which in my current understanding) is that it could minimize out-of-memory issue. So, this PR might benefit most in low RAM environment. I'll do another test in 2GB/1.5GB or maybe even 1GB environment. |
Actually, it is not interrupted / resumed by backpressure, but it is interrupted at each |
I just tested with 1GB RAM, and the differences are not significant.
Perhaps this is why my benchmark didn't show any difference, because it didn't test this. Overall, current evidence doesn't show this PR introduce any regression. I don't mind this PR, even though there's still no convincing evidence that it can significantly improve perf or reduce memory. It's a limitation of the benchmark I used (since it doesn't target Node app), perhaps someone can help benchmark IO processing, but again, I'm not suggesting to wait for another round of benchmark. |
This PR is a continuation of #62 .
One reason for the poor memory performance of #22 was that there was one
Readable
and oneWritable
, which were connected by apipe()
.Since only one Stream is a huge object, we thought the possibility that the increase in
Readable
led to memory pressure.The purpose of this PR is to verify whether memory consumption can be reduced while implementing interruption / resumption of processing by
Bluebird.coroutine()
.I don't know the details of the method of performance testing, but at least the testing of the Warehouse alone did not change the processing speed significantly.