Skip to content
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

Multi-core support #793

Closed
balupton opened this issue Jan 29, 2014 · 6 comments
Closed

Multi-core support #793

balupton opened this issue Jan 29, 2014 · 6 comments

Comments

@balupton
Copy link
Member

@Naatan has suggested we adopt a multi-core architecture:

#762 (comment)

For this to happen, we must first modularize all the things #445


Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

@greduan
Copy link
Contributor

greduan commented Jan 29, 2014

I don't see a benefit in this? It would be faster but if we optimize I think we could achieve the same speed easier, no?

Multi-core I think would only hide the slowness. IMO.

@Naatan
Copy link

Naatan commented Jan 29, 2014

There is no way that optimizing would achieve the same speed as a multi-threaded approach. The simple fact remains that no matter how much you optimize docpad you're still waiting for a write to finish before you can start another.

@balupton
Copy link
Member Author

The simple fact remains that no matter how much you optimize docpad you're still waiting for a write to finish before you can start another.

How true is this? We perform all of our file system operations asynchronously... which from my understanding gets around this, as asynchronous io = non-blocking io... right?

@Naatan
Copy link

Naatan commented Jan 29, 2014

Right, but it's still sending feedback over a single node thread. I don't know how async write is handled in node though, so I'd imagine you would have a better understanding on how this might affect things in the long run. I'd also imagine that there are areas besides writing files that could benefit from a multi-threaded approach.

Worth noting that if DocPad is already properly handling writes asynchronously then in theory it shouldn't be too hard to write up a test case to analyze the performance benefits of a multi-threaded approach for writes.

Once I've properly delved into DocPad's innards and have some time to spare I won't mind looking into some of the things I'm proposing myself.

@pflannery
Copy link
Contributor

I don't believe that nodejs has quite yet implemented multi-core support. They did try but ran in to too many issues so they rolled back...Some work around's are mentioned here

I think one thing docpad could benefit from is using promises (currently available in harmony mode) because event queuing is implemented directly inside V8 (instead the current fallback implementation using processTick\setImmediate with nodejs).

I heard the es6 (harmony) gets released in December this year? though not sure that is a reality.

@balupton
Copy link
Member Author

I'm doubtful this will provide any benefits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants