Get the latest tech news

The sorry state of Java deserialization


I’ve been on a bit of a frustration-driven quest to solve a problem I frequently encounter working on the search engine, that is, reading data from disk. You’d think this would be a pretty basic thing, but doing this in a way that is half-way performant is surprisingly hard and requires avoiding basically all the high level tools at your disposal. There’s a common sentiment that modern hardware is fast, so this may not matter, but we aren’t speaking a 30% performance hit, the the question is how many orders of magnitude you’re willing to forego.

I’ve been on a bit of a frustration-driven quest to solve a problem I frequently encounter working on the search engine, that is, reading data from disk. There’s a common sentiment that modern hardware is fast, so this may not matter, but we aren’t speaking a 30% performance hit, the the question is how many orders of magnitude you’re willing to forego. A decent hard drive will read sequential data at about 500 MB/s (as is the one we’re using for this test), so we’ll also add some reference times for 2GB and 10 GB assuming such a disk.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Java

Java

Photo of java deserialization

java deserialization

Photo of sorry state

sorry state

Related news:

News photo

GraalPy – A high-performance embeddable Python 3 runtime for Java

News photo

OpenJDK Java 23 Released With ZGC Generational Mode By Default

News photo

JavaScript, Python, Java: Redmonk's Programming Language Ranking Sees Lack of Change