TLDR

I tested the effectiveness of a cache implementation for a Go API using k6, cgroups and pprof, which helped to find the path to a 100x performance improvement.

Aims

I am writing a simple replica of the old Reddit project r/place - created by Josh Wardle of Wordle.

Place Example Image

The data for each pixel is stored in a sqlite3 database. When a request is made, currently the backend gets all pixel data from the database, and generates the PNG which is written to the response object.

The frontend polls the backend every 1 second for the latest version of the grid, as a PNG. Because of this frequency - there is no reason the image needs to be rebuilt more frequently than once every second.

Furt…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help