paws-r / paws

Paws, a package for Amazon Web Services in R
https://www.paws-r-sdk.com
Other
315 stars 37 forks source link

Documentation page taking a long time to load #769

Closed b-rhodes closed 5 months ago

b-rhodes commented 6 months ago

This page takes an extremely long time to load and often fails to load for me. I'm not sure if this is a wider issue but I thought I'd raise it in case it does affect more people.

DyfanJones commented 6 months ago

Hi @b-rhodes sorry about that. You are correct it is taking a long time to load up the documentation.

We are currently using AWS Cloudfront to host a static website from AWS S3. Sadly the site is too big for github pages and keeps failing to build when I attempt to host it there.

I am not a front end developer so I am not 100% sure how to improve the performance of the site. If you or anyone knows how to host large static websites please let me know in this thread.

b-rhodes commented 6 months ago

If you try loading it from an s3 bucket (without CloudFront) does it load faster? https://docs.aws.amazon.com/AmazonS3/latest/userguide/HostingWebsiteOnS3Setup.html

DyfanJones commented 6 months ago

For the cran we need to have HTTPS. Directly from S3 only support HTTP. However it is worth checking out

b-rhodes commented 6 months ago

Hmm, that's a good point. If it's hosted on github pages but using Cloudfront to distribute it, could you try to host on s3 instead and keep using cloudfront for the distribution? https://repost.aws/knowledge-center/cloudfront-https-requests-s3

DyfanJones commented 6 months ago

Sorry if I didn't explain it correctly. It currently is on S3 and uses Cloudfront to distribute.

I couldn't host it on GitHub due to its size

DyfanJones commented 6 months ago

Here is the current repo for the website build

https://github.com/paws-r/paws-r.github.io

DyfanJones commented 6 months ago

@b-rhodes please try the site now. I have added navigation.prune to the mkdocs yml config. This has reduced the --html files from roughly 3.5Mb to 2.8Mb. Not a huge change however a step in the right direction.

UPDATE: The latest version of mkdocs has given significant improvement with the file reduction. So from ~3.5Mb to ~200Kb.

DyfanJones commented 6 months ago

From my testing the site is responding a lot better however I would like feed back from users. :)

DyfanJones commented 5 months ago

Due to the improvements in mkdocs, we can host the site on github pages again (https://dyfanjones.github.io/paws-test-site/). I guess we could add this as a back up if the main site goes down.

b-rhodes commented 5 months ago

it's looking way better! Loads super fast by comparison now.

DyfanJones commented 5 months ago

Perfect I will close this now. If this issue comes up again please re-open