Comment

Comment by marginalia_nu

Optimizing the Marginalia Search index code. The new code is at least twice as fast in benchmarks, but I can't run it in production because it turns out when you do it's four times as slow as what came before it for the queries that are the simplest and fastest to the point where queries exceed their timeout values by a lot.

I'm 97% certain this is because the faster code leads to more page thrashing in the mmap-based index readers. I'm gonna have to implement my own buffer pool and manage my reads directly like that vexatious paper[1] said all along.

[1] https://db.cs.cmu.edu/papers/2022/cidr2022-p13-crotty.pdf

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton