madejejej.bsky.social
@madejejej.bsky.social
April 26, 2025 at 4:57 PM
Looks very neat!
March 18, 2025 at 11:16 AM
Interesting, why is that the case?
January 10, 2025 at 11:33 AM
Most of the time I'd do smth like `flex-col md/lg:flex-row` and perhaps also center on xs screens. Things usually look nicer centered on small screens.
December 12, 2024 at 3:07 PM
I have to go to sleep lol
December 11, 2024 at 11:25 PM
Also, around 10ms is spent rendering SVGs 🙃 I can LRU cache these calls.
December 11, 2024 at 11:21 PM
I'm not gonna do scientific benchmarks for now, but when profiling locally in production mode, it seems that it takes 4-5ms to render one element (MBP M1), and half of it is rendering the dropdown.

And the AR records are all loaded on the first element, so there's a "view penalty" from it as well?
December 11, 2024 at 11:13 PM
No sleeping 😅 The Phlex part is embedded in a Rails view (the whole collection is a single Phlex component though).

It dances with Rails a bit. The dropdown is... a Rails partial that renders a ViewComponent, because I haven't yet migrated all to Phlex. I can profile and see what the bottleneck is.
December 11, 2024 at 10:55 PM
The view that takes ~100ms to render is actually Phlex.

It renders a list of entities and has quite a bit of markup because each elem has a dropdown menu.

Here's what it looks like. The collection is uncached.
December 11, 2024 at 10:36 PM
So I rebooted Intel and it works much better now. Still slower than AMD but 1.5x, not 4x 😅
December 11, 2024 at 10:26 PM
Yeah it's a shared one
December 11, 2024 at 10:24 PM
OK, I'm onto something. Changed my CPU from Intel to AMD and it starts looking reasonable now.

I'm gonna switch back to Intel once more - perhaps either loud neighbour or smth wrong with physical server?

Or is AMD really THAT MUCH FASTER?!
December 11, 2024 at 10:22 PM
really nothing interesting here.
December 11, 2024 at 10:06 PM
Works faster than production locally.

Hetzner is 2x slow as Render even though it has 4vCPU, while Render has 0.5 CPU for web and 0.5 cpu for postgres 😬

Gonna look further...
December 11, 2024 at 10:04 PM
Good question! Gonna check it out in an hour
December 11, 2024 at 7:29 PM
Its probably either a loud neighbour on the cpu or I really f'ed something up when upgrading Rails from 7.2 to 8.0 🤔🤔🤔
December 11, 2024 at 7:06 PM
The DB is on the same Hetzner machine as my app
December 11, 2024 at 3:24 PM
Same view on render.com
December 11, 2024 at 3:19 PM