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

Ideal for serving static files?

Yep

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

@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

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

I’ll take a stab at it next week!

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/

FWIW here is how Nginx uses sendfile
. https://github.com/nginx/nginx/search?q=sendfile&unscoped_q=sendfile