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

Fuse is waiting #4

Closed
wants to merge 8 commits into from
Closed

Fuse is waiting #4

wants to merge 8 commits into from

Conversation

edelangh
Copy link

@edelangh edelangh commented Jul 6, 2017

No description provided.

Copy link
Member

@roblabla roblabla left a comment

Choose a reason for hiding this comment

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

Could you explain what's going on there ? I'm having trouble piecing everything together.

src/channel.rs Outdated
match errno().0 {
libc::EAGAIN => {
// this is u32, think about endian
unsafe { buffer.set_len(0) };
Copy link
Member

Choose a reason for hiding this comment

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

Use buffer.clear() instead, which is safe !

@edelangh
Copy link
Author

edelangh commented Jul 6, 2017

Thank you roblabla for this point, I just fix it
I find that strange that I cannot directly assign my new Vec to buffer

@roblabla
Copy link
Member

roblabla commented Jul 6, 2017

Doesn't *buffer = Vec::new() work ? Anyway, the clear() is better because it keeps the vec allocated instead of reallocating a new one.

@roblabla
Copy link
Member

roblabla commented Jul 6, 2017

So just for future reference : this PR is deeply tied with our proprietary daemon and basically allows us (in a somewhat dirty way) to get better performances. It's basically impossible to upstream as-is though.

While it certainly is more work, a better way to improve our performances would be fixing zargony#74 and using epoll to avoid threading (and all the mutex and jazz that comes with it).

@edelangh
Copy link
Author

edelangh commented Jul 6, 2017

*buffer = Vec::new() doesn't work

@roblabla roblabla closed this Sep 4, 2017
@edelangh edelangh deleted the fuse_is_waiting branch September 4, 2017 14:49
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