Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
Alter Hase
Beruf: Softwareentwickler (aktuell Web/Node); Freiberuflicher Google Proxy
Zitat
Maybe the biggest and the ugliest problem is the memory allocation. Currently the game allocates (and throws away immediately) 50 MB/sec when standing still and up to 200 MB/sec when moving. That is just crazy.
Zitat
[...]
5. Why is 1.8 allocating so much memory?
This is the best part - over 90% of the memory allocation is not needed at all. Most of the memory is probably allocated to make the life of the developers easier.
- There are huge amounts of objects which are allocated and discarded milliseconds later.
- All internal methods which used parameters (x, y, z) are now converted to one parameter (BlockPos) which is immutable. So if you need to check another position around the current one you have to allocate a new BlockPos or invent some object cache which will probaby be slower. This alone is a huge memory waste.
[...]
Zitat
The general trend is that the developers do not care that much about memory allocation and use "best industry practices" without understanding the consequences. The standard reasoning being "immutables are good", "allocating new memory is faster than caching", "the garbage collector is so good these days" and so on.
mojang_tommo, als Antwort auf den oberen PostZitat
Games can be either fast or extensible, pick one. I'll let you knife-fight it out with the ones demanding a plugin API.
(Hervorhebung von mir)Zitat
Well, there has been a big movement lately about zero-cost abstractions (see Rust or C++11) that aim to have the cake and eat it too, but in Java yep you can either have slow code or ugly code, mainly because someone in 1994 decided that the stack wasn't worth using and that ignoring that memory exists was a good idea.
Also, "zero cost" abstractions usually imply increased developer effort anyway.
Community-Fossil
Beruf: Teamleiter Mobile Applikationen & Senior Software Engineer
Community-Fossil
Beruf: Teamleiter Mobile Applikationen & Senior Software Engineer
Community-Fossil
Beruf: Teamleiter Mobile Applikationen & Senior Software Engineer
Eher nicht. Mit Minecraft 2.0 macht es vielleicht Sinn, wobei ich nicht sehe, wie ein Nachfolger dazu aussehen könnte, Clones gibt es ja eh schon hunderte.Ist es für eine solche Firma die Investition Wert, die komplette Codebasis über den Haufen zu werfen und das Ganze von Neuem zu beginnen?
Es ist ja keine Schande etwas falsch zu machen, als Programmierer tu ich das täglich, [...].
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Sacaldur« (21.10.2014, 15:33)
Naja, es ist ja nicht das erste Mal, dass solche News aufkommen. Beschwerden über den Java Code gab es ja schon häufig!
Es ist ja keine Schande etwas falsch zu machen, als Programmierer tu ich das täglich, [...].
Werbeanzeige