Giter VIP home page Giter VIP logo

awwsmm.com's People

Contributors

awwsmm avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

awwsmm.com's Issues

add social links

Link to

  • GitHub
  • Twitter
  • Dev.To
  • ?

...at least on the home page. Maybe also on blog and project pages, in the header.

add linter rules

  • disallow trailing spaces on lines
  • require types for all variables

fine-tune caching of projects to comply with GitHub rate limit

GitHub REST API rate limit is 5000 requests / hour when authenticated with a Personal Access Token

https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limiting

Vercel has 19 edge cache regions

https://vercel.com/docs/concepts/edge-network/regions

I am sending requests to GitHub for 4 repositories

awwsmm.com, BrainScript, ConwayScalaJS, DuckJump

So, in order to not exceed the 5000 requests / hour rate limit, the Vercel edge network caching time needs to be large enough such that 4 repositories * 19 edge cache regions * x requests per hour does not exceed 5000.

(5000 requests / hour) / (4 repositories) / (19 edge cache regions) = 65.789 refreshes / hour max

This means the refresh time should be at least (3600 seconds / hour) / (65.789 refreshes / hour) = 54.72 seconds

...which means the commit history on my website will be up-to-date about one minute after any repo has been updated.

This is maybe a bit unnecessary. We could afford to wait longer to give more of a buffer. So overall, we want something like

const github_rate_limit = 5000 // requests / hour
const vercel_regions = 19 // edge cache regions
const n_repos = 4 // awwsmm.com, BrainScript, ConwayScalaJS, DuckJump
const wiggle_multiplier = 5 // allow cache updates to take up to ~5 mins
const refresh_time = 3600.0 / (github_rate_limit / n_repos / vercel_regions) * wiggle_multiplier

simplify CSS

There are multiple CSS files and it's not clear what belongs where. Pull everything into one file for ease of maintenance and uniform styling across the site.

clean up pages API

  • clean up current implementation
  • add routes to get individual blog posts

speed up loading of awwsmm.com project page

I've already tried

...but the initial render still takes a few seconds on Vercel.

I wonder if

  • there's a way to display a Loading... overlay until the page is ready to display, or if
  • there's a way to pre-fetch the data before the user clicks on the page to load it, or if
  • I could display some stale (locally cached) data immediately while refreshing the edge cache in the background

Lots of things to look into... but my brain is tired of trying to fix this for now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.