popa.bogdanp
2019-10-16 09:24:47

Does Racket support the sendfile system call? Grepping the racket repo says no, but I want to make sure


soegaard2
2019-10-16 09:30:29

Ideal for serving static files?


popa.bogdanp
2019-10-16 09:33:19

Yep


popa.bogdanp
2019-10-16 09:33:45

I noticed serving static files from the web-server is pretty slow so that’s I’m asking.


samth
2019-10-16 13:18:33

@popa.bogdanp I don’t think so — if you want to add it, the right thing is probably to first add it to rktio to handle cross-platform issues, and then add a racket function that uses it


samth
2019-10-16 13:20:04

It looks like all of mac/linux/bsd/windows have something like sendfile, so adding it seems like a useful addition for everyone


popa.bogdanp
2019-10-16 13:45:24

I’ll take a stab at it next week!


joel
2019-10-16 18:17:47

This blog post has some good info. Apparently it’s not as great on some platforms as on others, but it would be nice to have access to it for sure https://jvns.ca/blog/2016/01/23/sendfile-a-new-to-me-system-call/


soegaard2
2019-10-16 21:55:57