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

Task/ww/avoid-spawnSync #4

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

c3wenjiaowang
Copy link
Collaborator

No description provided.

making nativeNC working with log

using execSync in child process

trial to make single client connection working

Revert "trial to make single client connection working"

This reverts commit d49656f.

wip

trial to write to buffer

Revert "trial to write to buffer"

This reverts commit 563ba6e.

making writing to file working

setting debugMode false

clean up

minor

addressing comments

adding random id for response file

updating version

revert

adding id for each response file

bump version
avoid json parsing the actual response content

fixing error

toggle debugMode to false
// use spawnSync (original sync-rpc method for sending request) for:
// 1. setup module (.t == 1)
// 2. normal request (.t == 0) and the request is an api call. (some server api calls fail with writing to keep-alive channel, like Pkg.writeContents.)
return input.t === 1 || input.t === 0 && input.a.u.indexOf('/typesys/8/') === -1;
Copy link
Collaborator Author

@c3wenjiaowang c3wenjiaowang Jun 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

limit the keep-alive channel to only serve type loading requests (with /typesys/8/ path), as it can't handle large amount of msg written to the channel. In Bundler, we are writing 18 Mb data for Pkg.writeContents call, and it hangs forever.

lib/index.js Outdated
function readResponseFile(filePath) {
const startTime = Date.now();
while (!responseFileReadyForReading(filePath)) {
// if (timeLimitExceeded(startTime)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

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

Successfully merging this pull request may close these issues.

None yet

2 participants