Zero-copy in JMonkey


I don’t have a chance to write any game yet. However, I love to read documentations as well as books. I found this article just now. VLC also uses it, so that it won’t use too much GPU.

To me, it sounds as a super good for performance. Can this technique be used in game development?

Thank you.

Well, once the hardware and drivers are ready I see no problem of using them in games too. But the whole article is too small and written in common words, so it’s hard to go further. Speaking of RDMA - well, can you imagine a game that utilizes a 40 Gbps synchronous link? Maybe, communications between two data centers running one WoW realm (I don’t know how scaleable their architecture is and if that’s even possible) or something, but even for that (I didn’t count, but at first glance) this looks kinda overkill. But anyway, once the low level supports something - I see no problem to rely on it in games as well.

Hi Torsion,

I think you meant using zero-copy on the web development side and alike. I found some of those information here too.

From the link above, it uses this example “Copying bytes from a file to a socket”. Now, beside web development example, can this zero-copy technique be used on other areas in game? I can only think of web socket for game development between client and the server too. How does VLC implement their?


Kind of memory mapping I guess, if you mention this. Nothing too revolutionary :slight_smile:

Thank Torsion. I think I have to look into memory mapping and buffer. I only heard about it for the first time today, so I thought it is super new. I will check it out.

You’re welcome. Memory mapping as a concept is something not just “not new” - it’s ancient. It’s definitely older than me, at least :slight_smile:

At the end of the day, sometimes you have to decide if you want to write a game “soon” or spend a decade eking that extra 10% out of some layer of it.


Yeah, tell me about it. On the other hand, there are always areas where you can still feel yourself being “new”, heh. Like, say, JME for me :baby:

Actually at least a larger part of meshes ect is using zero copy on the way to the gpu (at least all the way down the driver it is in fact just a pointer to a directbytebuffer), but not on the loading from disk.
This allows them to be interchangeable and not have to do stuff like pointer/id patching on loading.