💾 Archived View for freeside.wntrmute.net › log › 2022 › 20220208.gmi captured on 2022-04-28 at 17:50:01. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-03-01)

-=-=-=-=-=-=-

Back to gemlog

Nomad rewrite

2022-02-08 23:09 PST

now watching: Community S4E10

I think I've got a rewrite of Nomad in Go done.

The rewrite deployment

Interestingly enough, there's a bit of a performance regression. I suspect that sqlalechmy on the Python side is doing a lot of magic with connection pooling and caching. According to PageSpeed insights, the Python version's speed index is 2.2s, while the Go version is 2.4s. There's also far more code:



$ cloc nomad/nomad/*.py
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Python                           6            136             39            585
-------------------------------------------------------------------------------
SUM:                             6            136             39            585
-------------------------------------------------------------------------------

compared to



$ cloc nomad-go/
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Go                              30            381            181           1790
-------------------------------------------------------------------------------
SUM:                            30            381            181           1790
-------------------------------------------------------------------------------

Well, I stepped away to switch away to a Postgres connection pool... and dropped the PageSpeed speed down to 2.2s. So there's that. The performance score went to 96 (compared to the Python version's 92).

Once I get Wally to look over it and decide it's good to go, I'm going to switch over to it in 'production.'