1

I have a few objects which I'm storing in Redis by stringifying them and also storing as direct objects using RedisJSON. But one thing I observed is that reading the objects using JSON.GET is slower(almost 3 times slower) compared to REDIS.GET.

But obviously I need to parse the data back that are stored using REDIS.GET.

Could somebody explain why is there a huge difference in performance.

Gowthamss
  • 191
  • 1
  • 2
  • 13
  • Take a look at https://redis.io/docs/stack/json/performance/, in particular, comparison vs. server-side Lua scripting. There is a link to several simple Lua scripts that "approximate" what JSON commands do under the hood - they could give you a raw idea of where the performance penalty comes from... – Konstantin Strukov Nov 24 '22 at 10:10

0 Answers0