Jsonrs issues
Environment
- Installation type: Source
- Pleroma version: 2.4.5 stable
- Elixir version: Elixir 1.13.0 (compiled with Erlang/OTP 24)
- Operating system: Ubuntu
- PostgreSQL version: 12.12
Bug description
So I was looking for ways to speed up Pleroma, and I found Jsonrs, the authors claim it to be much faster than Jason and even Jiffy, you can see the graphs in their page. So anyway, I added it to mix.exs and used the following in my config:
config :phoenix, :format_encoders, json: Jsonrs, "activity+json": Jsonrs
config :phoenix, :json_library, Jsonrs
config :postgrex, :json_library, Jsonrs
To my surprise, everything seemed to work or so I thought, later I found out anything under the "Settings" menu for admin-fe doesn't seem to work properly when using Jsonrs.
I think I traced the issue to Phoenix not being able to decode the JSON for the settings' descriptions Pleroma sends to it when using Jsonrs, but thats as far I was able to go on my own.
I managed to get a full log of the error by adding config :logger, truncate: :infinity
to my config, as it was too long and got truncated otherwise.
The log file was upload here as it would probably be too long to include in the post.
So what I'm asking is if someone knows how to solve or even work around this issue, because if this Json library is that much faster, it could benefit everyone using Pleroma.