From 433459d8084d1f2d6500fdf916f22caa3b4d7be5 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 18 Apr 2023 19:31:02 -0400 Subject: [PATCH] README: performance --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index bc2af1c..be72de6 100644 --- a/README.md +++ b/README.md @@ -250,6 +250,10 @@ If you're building your own relay, make it compatible with [strfry plugins](http If you're writing software that deals with Nostr events in JavaScript or TypeScript, you can import this library and use its functions directly. +### Is performance good? + +It depends on which policies you use, but the short answer is "yes." Even policies that rely on sqlite (such as `rateLimitPolicy` and `antiDuplicationPolicy`) perform well. You should place those policies at the end of your pipeline so that synchronous policies have the chance to reject sooner. You can also mount a tmpfs volume and pass a `databaseUrl` option into those policies to serve their database from memory. + ## License This is free and unencumbered software released into the public domain.