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

Limit the number of documents processed at a single time. #1831

Open
ebolyen opened this issue Jan 30, 2025 · 1 comment
Open

Limit the number of documents processed at a single time. #1831

ebolyen opened this issue Jan 30, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@ebolyen
Copy link

ebolyen commented Jan 30, 2025

Proposal

Currently it appears that all documents are processed at the same time in parallel.
When using an executable plugin, this results in a process for each document. In the event that this executable plugin does something computationally expensive (like execute a code example), this quickly thrashes your machine.

I'm not sure if it makes sense to have a process pool for executable plugins, so that only X number run at a time (leaving promises on the event loop to wait around for a worker). Or, if the entire mdAST transform (getFileContent) should be batched, so that only X documents are processed at the same time.

We would probably want something like a single transform in our executable-plugin to run per CPU available.

@ebolyen ebolyen added the enhancement New feature or request label Jan 30, 2025
@agoose77
Copy link
Contributor

This is a good enhancement suggestion. We need to think carefully about the best solution, because we also want to support remote execution on different compute environments! In those cases, the concept of CPU availability may be less well defined.

Nevertheless, our local execution could definitely do this by default.

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

No branches or pull requests

2 participants