This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-03-30
Channels
- # announcements (1)
- # beginners (113)
- # cljs-dev (5)
- # cljsrn (20)
- # clojure (16)
- # clojure-losangeles (1)
- # clojure-nl (1)
- # clojure-spec (17)
- # clojure-uk (5)
- # clojurescript (125)
- # core-async (4)
- # cursive (4)
- # datomic (66)
- # defnpodcast (1)
- # fulcro (25)
- # kaocha (2)
- # klipse (1)
- # nrepl (19)
- # re-frame (5)
- # reagent (3)
- # reitit (6)
- # ring-swagger (16)
- # shadow-cljs (16)
- # sql (6)
- # test-check (1)
- # tools-deps (1)
- # vim (7)
@metametadata was it faster than transit? It’s not what I saw in my benchmark but maybe I should try again
Unfortunately, I don't remember all the details, but yeah, the files were bigger: ~10-100 mb. Maybe I was bitten by the issue you found yesterday (https://github.com/cognitect/transit-clj/issues/43)?.. I should also try again I guess and would be happy to be wrong in the end.
Did some quick tests: • for in-process/memory encode+decode, jsonista is 10x faster on small messages. still over 2x faster with 10k payloads. transit requires to read & write streams. Jsonista allows data -> byte[] -> data • for NIO messaging, over the wire, both are fast, with reitit+immutant(my perf fork):
➜ reitit git:(master) ✗ curl
{"message":"Hello, World!"}%
➜ reitit git:(master) ✗ curl
["^ ","~:message","Hello, World!"]%
➜ reitit git:(master) ✗ wrk -t20 -c100 -d2s
Running 2s test @
20 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 0.89ms 94.36us 5.28ms 95.11%
Req/Sec 5.61k 187.34 5.98k 83.81%
234540 requests in 2.10s, 34.22MB read
Requests/sec: 111683.59
Transfer/sec: 16.30MB
➜ reitit git:(master) ✗ wrk -t20 -c100 -d2s
Running 2s test @
20 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.04ms 694.28us 12.24ms 97.22%
Req/Sec 5.13k 590.77 8.91k 93.96%
211384 requests in 2.10s, 32.25MB read
Requests/sec: 100614.73
Transfer/sec: 15.35MB
awesome, thanks. I was just about to publish the similar benchmarks using jsonista.json-perf-test
🙂
I’m not sure what I’m looking at with this test. I need to serialize to disk, but I think that’s an orthogonal concern right? if it’s faster in memory, it should also be faster to disk
I hope I can get jsonista to compile with graalvm. I was happy that transit worked, but it’s good to have another candidate
@borkdude haven't tested file perf, but with jsonista, calls are passed directly to Jackson, which supports all kind of file writing & reading oob. Overhead should be zero'ish on clj-side. Some samples on files: https://github.com/metosin/jsonista/blob/master/test/jsonista/core_test.clj#L215-L238
that said, if that is internal format, nippy is also a good option: https://github.com/ptaoussanis/nippy
I tried nippy, but that didn’t work with Graal. I could get fressian to work with some tweaks though, but performance was in the same ballpark as transit.