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

reduce the number of unnecessary clones and arguments by changing the order in which NotifyListeners are generated. #170

Closed
wants to merge 1 commit into from

Conversation

utam0k
Copy link
Member

@utam0k utam0k commented Jul 29, 2021

… order in which NotifyListeners are generated.
@yihuaf
Copy link
Collaborator

yihuaf commented Jul 29, 2021

Just a thought, maybe it is better to create an arg struct and have container_init takes in the arg? The container_init function needs to be passed to the child process, where these args need to be cloned, so the memory can be owned by the child process. The only concern is this arg struct would be 70% similar member to ContainerBuilderImpl. In addition, likely we will have to pass extra args into the container_init function in the future as we support more features. "preserve-fds" is already one more that I am working on. So it sure will be pass the 7 threshold again and again.

@yihuaf
Copy link
Collaborator

yihuaf commented Jul 30, 2021

I just created PR #173 and I did exactly what I suggested above, grouping the args into a struct. I did it for another reason but seems to resolve the issue you mentioned here. Let me know what you think about the pros and cons of both approaches :)

@utam0k
Copy link
Member Author

utam0k commented Jul 30, 2021

#173 is better.

@utam0k utam0k closed this Jul 30, 2021
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.

2 participants