frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Why serialize documents to disk instead of memory-mapping runtime state?

2•ShengATsao•1h ago
Opening files like docx requires heavy string parsing and pointer allocation. After an OS swaps active RAM pages out as to flash disk as virtual memory, it can restore them almost instantly. Using 2X more flash disk space is worth if we can achieve millisecond loads. Why hasn't direct memory dumping/reloading replaced file parsing for complex document models?

I started a company in 2000 to build a commercial cross-platform desktop suite in Java. To achieve seamless live-data-linking across text, sheets and slides, we stored data objects into a 3D coordinate space (Sheet_Num,Row_Num,Column_Num) and reference/access them instead of pointers. This scheme enable us open a 50,000-pages document in 8 seconds, compared to 300+ seconds by a competing suite requiring parsing andan array of pointer construction.

Recently, some suggested that our 3D design without referencing data by pointers can possibly use OS provided mmap to restore back the entire document image as loaded into the RAM to flash disk. Instead of opening the file again with all those parsing/pointer-building work, the memory mapped buffers can be simply be brought back into RAM in milliseconds.

Our senior engineers have confirmed the feasibility and tries to prove it, but, they have encountered numerous problems to save using OpenJDK and CRaC on Linux. They told me that OpenSDK has stated that it can be done but probably did not test this part thoroughly because they never expected it be actually used.

Has any one successfully decouple a complex document substrate into off-heap memory to achieve true zero-copy mmap load or does the JVM runtime always get in the way?

Comments

verdverm•42m ago
So we can share them with each other? Are we going to pass around memory dumps instead? What about tool choice when working on a specific document format?
jamwise•23m ago
Serializing has many uses.

- Memory might not look the same on all platforms, if your app is multi-platform you stop being able to share your data cross-platform.

- The internal data structures of your app will absolutely change as your app evolves, the binary data in memory is a raw result of your data structures. So you have to commit to never changing data structures, or create complicated binary migration tools to update memory when your app updates.

- Debugging corrupted memory is incredibly tedious any sometimes impossible. Having plain text serialized data makes debugging much more straightforward.

Top my my head I would suggest to focus more on improving performance on your serialization pipeline. There might be some subset of your data that is unlikely to ever change and is identical on all platforms, maybe your serializer is hybrid in that case.

gavinray•4m ago
When you use RandomAccessFile API in JVM one of the flags allows you to mmap the contents

        try (RandomAccessFile file = new RandomAccessFile("example.dat", "rw");
             FileChannel channel = file.getChannel()) {
            
            // Map the file into memory from position 0 up to bufferSize
            MappedByteBuffer buffer = channel.map(FileChannel.MapMode.READ_WRITE, 0, bufferSize);
Once you have a mappedbytebuffer you can use MemoryLayout from FFM to view it as structured data without deserializing

Steve Bannon and Bernie Sanders Condemn Tech 'Oligarchs' and Demand A.I. Reforms

https://www.nytimes.com/2026/09/15/us/steve-bannon-bernie-sanders-ai.html
1•mikhael•2m ago•0 comments

Founding documents from companies that shaped industries

https://relentless-investments.com/library
1•rafaelc•2m ago•0 comments

Waymo to start Tokyo robotaxi service next year in Asia push

https://www.japantimes.co.jp/business/2026/09/15/companies/waymo-tokyo-robotaxi-launch/
1•mikhael•5m ago•0 comments

Interview with Paul Bogen [video]

https://www.youtube.com/watch?v=GJQlzbhai-w
1•oriettaxx•9m ago•0 comments

Divide, Consult, Conquer: Capability Laundering Through Aligned LLMs

https://arxiv.org/abs/2609.15383
2•sbulaev•10m ago•0 comments

Singapore launched a novel five-year national campaign to nurture reading habits

https://www.cnn.com/2026/09/15/asia/singapore-reading-campaign-intl-hnk-dst
2•kelt•14m ago•0 comments

Biom – A visual workspace where your AI agents' work lands

https://www.biom.dev/
2•jduhking•15m ago•0 comments

Hackaday Europe 2026: Bare Metal Made Easy

https://hackaday.com/2026/09/15/hackaday-europe-2026-bare-metal-made-easy/
2•geoffbp•19m ago•0 comments

Show HN: Plurnk (Yet *Another* AI Harness)

https://github.com/plurnk/plurnk
1•wikitopian•20m ago•0 comments

Independent Lens – Ghost in the Machine: AI's troubled history, current impacts

https://www.pbs.org/video/ghost-in-the-machine-nynp3f/
3•frmersdog•27m ago•1 comments

Ask HN: Who has been contacted by 5+ hiring platforms?

2•Rapzid•28m ago•3 comments

Is There Anything Google's Fruit Fly Brain Can't Do?

https://www.nytimes.com/2026/09/15/technology/fruit-fly-brain-map-google.html
5•xnx•29m ago•0 comments

Callum Williams on Cybersecurity Prices

https://marginalrevolution.com/marginalrevolution/2026/09/callum-williams-on-cybersecurity-prices...
3•paulpauper•36m ago•0 comments

Probably the best laptop with Linux support and Local LLM AI [video]

https://www.youtube.com/watch?v=it7TAwjwH5E
3•grigio•40m ago•0 comments

Atlas-Finance: Evaluating AI Agents Inside a Bank

https://joinhandshake.com/research/benchmarks/articles/atlas-finance-evaluating-ai-agents-inside-...
2•cjbarber•40m ago•1 comments

Disney's Films Used to Look Different

https://animationobsessive.substack.com/p/disneys-films-used-to-look-different
3•ummonk•41m ago•0 comments

1F3D9: A world where anyone's AI agent can go to live without humans

https://1f3d9.com/window/map
2•twamd•44m ago•2 comments

Nobody Needs a Human Router

https://theengineeringmanager.substack.com/p/nobody-needs-a-human-router
1•gpi•48m ago•0 comments

Show HN: Agenttik – work on multiple projects in parallel with AI agents

https://github.com/pausan/agenttik
3•psanchez•53m ago•0 comments

Faraday Security Enforcing and HyDE Recall

https://medium.com/@vektormemory/vektor-slipstream-real-tool-calling-faraday-security-enforcing-h...
1•vektormemory•57m ago•0 comments

Show HN: Open-source tool to sell your Claude Code and Codex sessions

https://github.com/cookiy-ai/sell-sessions-skill
1•YouchaoDong•59m ago•1 comments

Moving coding-agent guardrails from prompts to hooks

https://tesseracted-labs-blog.vercel.app/enforcing-coding-agent-guardrails-in-the-runtime-instead...
3•kkm•1h ago•0 comments

Intel TDX Remote Attestation Verifier Without Intel Trust Authority

https://zatona.dev/blog/intel-tdx-remote-attestation-verifier
2•dzatona•1h ago•0 comments

Saving Jet Fuel

https://tech.marksblogg.com/scikit-decide-openap-optimal-flight-planning.html
13•marklit•1h ago•6 comments

Ask HN: Why serialize documents to disk instead of memory-mapping runtime state?

2•ShengATsao•1h ago•3 comments

The Ex-Cop Who Stole Millions to Become a Real-Life Robin Hood

https://magazine.atavist.com/2026/the-bleeding-hearts-austria-robbery
1•gmays•1h ago•0 comments

"The Secret Life of Circuits" is here

https://blog.coredump.cx/p/the-secret-life-of-circuits-is-here
2•surprisetalk•1h ago•0 comments

Astra's chess reward hacking fell from 30% to 0% with a 95-word agreement

https://www.echohive.ai/can-an-agreement-reduce-ai-cheating-at-chess
2•echohive42•1h ago•0 comments

Gravity Linux – Linux for Apple Silicon M4 and Above

https://gravitylinux.org/blog/hello-gravity/
2•xlmnxp•1h ago•2 comments

Clarity Act Stalls in Senate as Crypto Bill Fails to Clear Key Vote

https://decrypt.co/378283/clarity-act-fails-senate-hurdle
5•consumer451•1h ago•0 comments