Editor · Reading list · Ten editor-books anti-patterns — how many are you guilty of?

9
EDr/editor-books·posted by bob_chen·1 hour agoTutorial

Ten editor-books anti-patterns — how many are you guilty of?

Short version: editor-books needs almost no tuning at small and medium scale — the point where it starts to hurt is much further out than most people assume. Full measurements below.

On trade-offs, my view is this: if nobody on the team owns this area long-term, do not introduce a second mechanism. With two coexistence you first have to work out which one is even in play when things break, and that costs far more than the performance you saved.

Image placeholder · object storage in production
POST /api/uploads → CDN origin pull
3 comments

3 comments

M
Ddev_zhou·12 minutes ago

I just read the editor-books source — the author actually explains the reasoning in a comment, roughly "so that it degrades into predictable behaviour in extreme cases".

443
Aalice_dev·just now

One counter-example: below editor-books 7.4 the semantics of that code are different, so do not copy it verbatim. We got burned in staging and rolled back once.

29
Kkite·1 hour ago

We have run this in production for two years without hitting it. That said, we never reached this scale, so our experience is not really evidence here.

1

This is the post detail page /en/c/editor-books/post/p7. Posts and comments are generated deterministically from a seeded PRNG, so the same post always renders the same content and the link can be shared, reloaded and indexed. In production this page reads MySQL for the post, Redis for hot-post caching, and fetches the whole comment tree in a single query on the path column.

See the database schema →