2 ms·
That's cool! I wonder if this would be (much) faster than just letting nginx or this embedded httpd read the files directly and serve them. I would hope that th
by mbreese 13y ago
That's cool! I wonder if this would be (much) faster than just letting nginx or this embedded httpd read the files directly and serve them. I would hope that the OS or server would cache things enough to make it unnecessary, but it would be interesting to find out.
HTML isn't that big, so if you used linked resources, it would be pretty simple to make a C program and compile it to a binary for any purely "static" site.
- damien 13y agoThat's how the Kore web server works ( https://kore.io/ https://kore.io/ ); it makes you generate a static.h file at compile time that contains all of you your static content. But like you say, I have to wonder if it actually makes a difference performance-wise. The kernel will cache the static file data anyways. The only improvement I can see is maybe to avoid having to look up file metadata (length and mtime)? Or to avoid a syscall?