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

Speed up or avoid downloading of css from http://www.php.net in render.php #70

Closed
TysonAndre opened this issue Oct 21, 2022 · 0 comments · Fixed by #97
Closed

Speed up or avoid downloading of css from http://www.php.net in render.php #70

TysonAndre opened this issue Oct 21, 2022 · 0 comments · Fixed by #97

Comments

@TysonAndre
Copy link

TysonAndre commented Oct 21, 2022

When running phd/render.php --docbook doc-base/.manual.xml --package PHP --partial=book.simdjson --format xhtml - it takes 10 seconds

Using https://github.com/adsr/phpspy to render a flame graph:

phd-flame-graph

  1. Use php's curl module if available?
  2. Use a different CDN for static assets if possible, or check if the file is recent? (This is taking 5 seconds per file, which is a different question for a different repo)
  3. Send etags/if-modified-since? (doesn't help, still slow https://daniel.haxx.se/blog/2019/12/06/curl-speaks-etag/ )
  4. It's a fast 0.01 second redirect to https://www.php.net/styles/theme-base.css
  5. Maybe check the modification time on disk and cache on disk as sha($url) on http 200s, and allow it by default if the css file modification time is less than a day old
Copying http://www.php.net/styles/theme-base.css
Copying http://www.php.net/styles/theme-medium.css
» wc output/php-chunked-xhtml/**/*.css  
 1884  3784 32631 output/php-chunked-xhtml/styles/03e73060321a0a848018724a6c83de7f-theme-base.css
  606  1242 11091 output/php-chunked-xhtml/styles/03e73060321a0a848018724a6c83de7f-theme-medium.css
 2490  5026 43722 total
< HTTP/2 200 
< server: myracloud
< date: Fri, 21 Oct 2022 12:52:18 GMT
< content-type: text/css
< last-modified: Mon, 17 Oct 2022 12:10:02 GMT
< etag: "634d461a-7f77"
< expires: Sat, 22 Oct 2022 11:06:08 GMT
< cache-control: max-age=86400
< x-cdn: 1

This might just be a wifi or cdn or isp issue, though - see php/web-php#556

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 a pull request may close this issue.

1 participant