Cache more things, add page speed to README
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
parent
ee6a512b47
commit
f261baf9a3
12
README.md
12
README.md
|
@ -44,10 +44,18 @@ The following are optional.
|
|||
`GUMBO_LIBXML_LOCATION` - Path to `libgumbo_xml.so` (default `./gumbo-libxml/.libs/libgumbo_xml.so`, can be edited to `libgumbo_xml`, which does the same thing as `libxml2` in `LIBXML2_LOCATION`)
|
||||
|
||||
# Performance
|
||||
## Local
|
||||
RAM usage maxes out below 200 MiB (162 in production testing, different from local, which was around 95 MiB).
|
||||
## Hardware
|
||||
RAM usage seems to max out below 150 MiB (134 in production testing, different from local, which was around 65 MiB).
|
||||
|
||||
## Page
|
||||
Due to the nature and method of proxying images, the performance on first load is poor (PageSpeed Inisghts speed index of 2.5s).
|
||||
|
||||
After the first load, though, your browser's cache control should kick in, and any subsequent requests for an image are cached.
|
||||
|
||||
Altogether, the performance listed on PageSpeed Insights is 63.
|
||||
|
||||
# Todo
|
||||
* Speed up image proxying somehow
|
||||
* Video list page*
|
||||
* Video page*
|
||||
* User page (it is internally linked)
|
||||
|
|
10
meme.scm
10
meme.scm
|
@ -41,11 +41,17 @@
|
|||
(cond
|
||||
((equal? path "/style.css")
|
||||
(display ";\tHandler: internal") (newline)
|
||||
(values '((content-type . (text/css)))
|
||||
(values '((content-type . (text/css))
|
||||
(cache-control .
|
||||
,(parse-header 'cache-control
|
||||
"max-age=604800")))
|
||||
(call-with-input-file "static/style.css" get-string-all)))
|
||||
((equal? path "/favicon.png")
|
||||
(display ";\tHandler: internal") (newline)
|
||||
(values '((content-type . (image/png)))
|
||||
(values '((content-type . (image/png))
|
||||
(cache-control .
|
||||
,(parse-header 'cache-control
|
||||
"max-age=604800")))
|
||||
(call-with-input-file "static/logo.png" get-bytevector-all)))
|
||||
((equal? path "/proxy")
|
||||
(proxy-page (uri-query uri)))
|
||||
|
|
Loading…
Reference in New Issue