A Closer Look at Transit
swannodette.github.io
swannodette.github.io
There's some reason to believe that MessagePack is noticeably faster than JSON on every language but Javascript.
Edit: s/entirely/entire/
The localhost testing done in the article will not show this advantage of MessagePack.
Would it be possible to make a 2-way converter between them which would retain full fidelity of the Transit data when round-tripping, so that we could use EDN for actually inspecting/writing (e.g. config files), but then send Transit over the wire to a browser?
I don't think it would be difficult to convert between EDN and Transit using existing readers and writers for both. The common meeting point is values in your language.
https://github.com/cognitect/transit-format/tree/master/exam...
In addition transit-cljs is a great way to consume JSON endpoints from ClojureScript without the massive perf hit of cljs.core/js->clj. You can also trivially spit out JSON from ClojureScript via transit-cljs as long as your map keys are strings and not keywords using a json-verbose Transit writer.
Also, Computer Modern is so so so ugly (IMHO of course).
I can easily imagine a endpoint providing both Transit JSON and plain JSON. I know which one I'd rather consume from the client when building a sophisticated application.
Why does Transit performance take such a hit in Mobile Safari? (In desktop Safari on my Mac, performance seems to be about the same between JSON+hydrate vs. Transit. But the charts below show that especially on later versions of mobile Safari Transit is quite a bit slower.)
http://blog.cognitect.com/blog/2014/7/22/transit
http://swannodette.github.io/2014/07/23/a-closer-look-at-tra...
Edit: the tour linked at the bottom is basically what I was looking for. http://cognitect.github.io/transit-tour/
it's effectively the same input, but optimised for JSON.parse() rather than transit. This means it purely decodes into objects with fast properties (in V8 at least), so objects never have to undergo the -> hash table transition. It seems consistently faster, but you can argue that it's not doing quite the same thing.
As a general rule the optimizations in transit-js take all browsers into consideration - not any particular one.