Conversation
|
This is just a temporary solution. We should dig into this later. |
|
The purpose of #22 was to prevent memory exhaustion. Using https://github.com/hexojs/site as test site (since it contains hundreds of files and used in hexojs/hexo#3758), I wonder what is the memory usage of current situation versus this PR? I will test in my workstation, but it's better if you can chime in as well. |
|
Current master branch: about 300MB I can see there is a lot of hard task on |
Lower memory huh. I'll test this on my end by today. I got higher memory usage. Tested on a VM with a single CPU and 4GB RAM, using Node 8.16 (for worst case scenario). Two tests were conducted in separate folders.
Current master branch: This PR: Node 12.12, fresh Current: This PR: |
curbengh
left a comment
There was a problem hiding this comment.
Current approach sacrifices too much performance for memory. I concur with reverting, at least for now.
|
I agree with the purpose of PR. Stream is a technique that prevents memory depletion at the expense of memory performance, but did not expect it to drop by a factor of 30. |
This PR reverts #22 since the
Database.savebecomes 30x slower based on hexojs/hexo#3758