digitalmars.D - OT: Minecraft death by GC
- ROOAR (7/7) Oct 21 2014 So the latest Minecraft apparently runs really really poorly
- ketmar via Digitalmars-d (5/17) Oct 21 2014 ft_18_has_so_many_performance/
- ROOAR (4/7) Oct 21 2014 I know! It is great being me!
- ketmar via Digitalmars-d (3/6) Oct 21 2014 yeah, this was... refreshing morning. ;-)
- Kapps (7/7) Oct 21 2014 "Maybe the biggest and the ugliest problem is the memory
- thedeemon (4/7) Oct 21 2014 In D this rate of allocation would make GC take 100% of CPU time.
- deadalnix (8/15) Oct 21 2014 That is obviously the problem, and switching to a non GC model
- Paulo Pinto (7/14) Oct 21 2014 Well, some JIT compilers do stack allocation via escape analysis,
- "Casper =?UTF-8?B?RsOmcmdlbWFuZCI=?= <shorttail hotmail.com> (8/14) Oct 23 2014 I'm looking forward to that. The currently proposed stuff for 9,
- francesco.cattoglio (3/10) Oct 21 2014 More like: take that you smart business people who buy a bloated
- Mathias LANG (4/27) Oct 21 2014 I could quote the entire post, but the bottom line is: this issue
- ROOAR (10/17) Oct 21 2014 This issue sure does seem to crop up in GC world, wonder why. Oh
- monarch_dodra (5/10) Oct 21 2014 Hurp, I wonder why GC issues only appear with application that
- David Gileadi (2/6) Oct 21 2014 Happily with a little work D allows you to have both! :)
- Israel (3/12) Oct 21 2014 Im curious, will D be one of the first languages to have the
- Francesco Cattoglio (3/17) Oct 21 2014 More likely: to give you the ability to shoot yourself in the
- ketmar via Digitalmars-d (4/6) Oct 21 2014 On Tue, 21 Oct 2014 16:16:17 +0000
- Israel (3/10) Oct 21 2014 YESS!!
- Kagamin (3/6) Oct 24 2014 Or they don't fix problems, which didn't appear.
- Szymon Gatner (2/6) Oct 24 2014 That. Minecraft was never expected to be that big.
- Paulo Pinto (9/16) Oct 21 2014 Part of my work is to teach people to use tools like VisualVM,
- ROOAR (5/8) Oct 21 2014 What is this VisualVM you speak of! Off I go!!
- Szymon Gatner (4/11) Oct 21 2014 Crazy idea: reach pleayerbase of Minecraft. Hit the same problem
- "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= (6/9) Oct 21 2014 Great plan! Make a DIP! or:
- Szymon Gatner (7/17) Oct 21 2014 Not quite sure if you mean actual deals (tho 2 mins of googling
- Rikki Cattermole (4/12) Oct 21 2014 I'll just put this right here.
- Szymon Gatner (3/19) Oct 21 2014 You are not suggesting you sold it for $16B tho, right? ;)
- Rikki Cattermole (2/20) Oct 21 2014 No unfortunately, and not complete. But I more or less did make it ;)
- ROOAR (1/4) Oct 21 2014 Why? Wait why? Also Cobol looks horrid. Why is it all caps.
- Wyatt (3/4) Oct 21 2014 You're kind of new to this "legacy" thing, aren't you? ;)
- Rikki Cattermole (6/11) Oct 21 2014 Last semester I had an assignment to port some COBOL code to Python.
- "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= (23/29) Oct 21 2014 Haha! :-D Cool, or should I say Dool? «Dobol, enjoy the future of
- Chris (13/20) Oct 21 2014 I don't think the question is whether or not GC is inherently
- Marco Leise (13/22) Oct 21 2014 Sorry to rain on the parade, but the original code by Notch
- Chris Nicholson-Sauls (4/4) Oct 23 2014 Eh. All I know is, this version that allegedly has framerates in
So the latest Minecraft apparently runs really really poorly because of the GC. And it is running on Java desktop. The supposedly "fast" GC of Java can't handle the game anymore-- https://www.reddit.com/r/programming/comments/2jsrif/optifine_dev_minecraft_18_has_so_many_performance/ Take that GC fanatics D needs more action you know.
Oct 21 2014
On Tue, 21 Oct 2014 07:18:26 +0000 ROOAR via Digitalmars-d <digitalmars-d puremagic.com> wrote:So the latest Minecraft apparently runs really really poorly=20 because of the GC. =20 And it is running on Java desktop. The supposedly "fast" GC of=20 Java can't handle the game anymore-- =20 https://www.reddit.com/r/programming/comments/2jsrif/optifine_dev_minecra=ft_18_has_so_many_performance/=20 =20 Take that GC fanatics =20 D needs more action you know.wow! you are the man! you are the savior! sorry, my Guru, can't write to you anymore: i need to remove GC from all my projects!
Oct 21 2014
wow! you are the man! you are the savior! sorry, my Guru, can't write to you anymore: i need to remove GC from all my projects!I know! It is great being me! I had to do it, D forum was putting me to sleep with its discussion of Postblits and environmental errors. Phfff like those matter.
Oct 21 2014
On Tue, 21 Oct 2014 07:44:09 +0000 ROOAR via Digitalmars-d <digitalmars-d puremagic.com> wrote:I had to do it, D forum was putting me to sleep with its=20 discussion of Postblits and environmental errors. Phfff like=20 those matter.yeah, this was... refreshing morning. ;-)
Oct 21 2014
"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." Wonder how much better that would be if Java had proper value types. The idea of allocating on the heap for every single Vector3f makes me sad.
Oct 21 2014
On Tuesday, 21 October 2014 at 07:37:06 UTC, Kapps wrote:"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."In D this rate of allocation would make GC take 100% of CPU time. The fact that Java survives it with just some frame rate loss shows how great its GC is.
Oct 21 2014
On Tuesday, 21 October 2014 at 07:37:06 UTC, Kapps wrote:"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." Wonder how much better that would be if Java had proper value types. The idea of allocating on the heap for every single Vector3f makes me sad.That is obviously the problem, and switching to a non GC model would still be horribly slow when you allocate like mad. What they need is way to not allocate that much. Also http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1272953-optifine-hd-a4-fps-boost-hd-textures-aa-af-and#c43757 People have found that with various tweaks, you can get a x2 framerate.
Oct 21 2014
On Tuesday, 21 October 2014 at 07:37:06 UTC, Kapps wrote:"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." Wonder how much better that would be if Java had proper value types. The idea of allocating on the heap for every single Vector3f makes me sad.Well, some JIT compilers do stack allocation via escape analysis, which you can check with something like JITWatch. For first class support, it is planned for Java 9, but it might only really come in Java 10. -- Paulo
Oct 21 2014
On Tuesday, 21 October 2014 at 21:33:43 UTC, Paulo Pinto wrote:Well, some JIT compilers do stack allocation via escape analysis, which you can check with something like JITWatch. For first class support, it is planned for Java 9, but it might only really come in Java 10. -- PauloI'm looking forward to that. The currently proposed stuff for 9, like Jigsaw, go way over my head in terms of usefulness. In regard to the Minecraft code, it sounds like new features were prototyped and never optimized. Writing slow stuff fast is nice in Java (and D!), but without going full circle it's not so nice in the long run. I guess Microsoft has its work cut out for it.
Oct 23 2014
On Tuesday, 21 October 2014 at 07:18:28 UTC, ROOAR wrote:So the latest Minecraft apparently runs really really poorly because of the GC. And it is running on Java desktop. The supposedly "fast" GC of Java can't handle the game anymore-- https://www.reddit.com/r/programming/comments/2jsrif/optifine_dev_minecraft_18_has_so_many_performance/ Take that GC fanatics D needs more action you know.More like: take that you smart business people who buy a bloated piece of **** for 2.5 BILLION $$$
Oct 21 2014
On Tuesday, 21 October 2014 at 07:18:28 UTC, ROOAR wrote:So the latest Minecraft apparently runs really really poorly because of the GC. And it is running on Java desktop. The supposedly "fast" GC of Java can't handle the game anymore-- https://www.reddit.com/r/programming/comments/2jsrif/optifine_dev_minecraft_18_has_so_many_performance/ Take that GC fanatics D needs more action you know.How did that work in previous releases? The previous Minecraft releases were much less memory hungry. The original Notch code (pre 1.3) was allocating about 10-20 MB/sec which was much more easy to control and optimize. The rendering itself needed only 1-2 MB/sec and was designed to minimize memory waste (reusing buffers, etc).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.tldr; When 1.8 is lagging and stuttering the garbage collector is working like crazy and is doing work which has nothing to do with the game itself (rendering, running the internal server, loading chunks, etc). Instead it is constantly cleaning the mess behind the code which thinks that memory allocation is "cheap".I could quote the entire post, but the bottom line is: this issue has nothing to do with the GC. Crappy code is crappy code. So your OP is just pointless troll.
Oct 21 2014
I could quote the entire post, but the bottom line is: this issue has nothing to do with the GC. Crappy code is crappy code. So your OP is just pointless troll.This issue sure does seem to crop up in GC world, wonder why. Oh well. That company with $2.5 billion can't find competent Java engineers lolz! Memory isn't scaling at the rate compute is. I wonder how much worse this issue will be in 5 years. Oh well, let's just write more Java code:)In D this rate of allocation would make GC take 100% of CPU time. The fact that Java survives it with just some frame rate loss > shows how great its GC is.So: Java GC is turd D GC is wretched turd
Oct 21 2014
On Tuesday, 21 October 2014 at 09:07:04 UTC, ROOAR wrote:Hurp, I wonder why GC issues only appear with application that use a GC. Hurp-a-durp. Also, the issue of memory leak and core dumps seem to only appear when you use a systems language. How crazy is that?I could quote the entire post, but the bottom line is: this issue has nothing to do with the GC. Crappy code is crappy code. So your OP is just pointless troll.This issue sure does seem to crop up in GC world, wonder why. Oh well.
Oct 21 2014
On 10/21/14, 2:47 AM, monarch_dodra wrote:Hurp, I wonder why GC issues only appear with application that use a GC. Hurp-a-durp. Also, the issue of memory leak and core dumps seem to only appear when you use a systems language. How crazy is that?Happily with a little work D allows you to have both! :)
Oct 21 2014
On Tuesday, 21 October 2014 at 15:23:11 UTC, David Gileadi wrote:On 10/21/14, 2:47 AM, monarch_dodra wrote:Im curious, will D be one of the first languages to have the ability to use a GC and not use one?Hurp, I wonder why GC issues only appear with application that use a GC. Hurp-a-durp. Also, the issue of memory leak and core dumps seem to only appear when you use a systems language. How crazy is that?Happily with a little work D allows you to have both! :)
Oct 21 2014
On Tuesday, 21 October 2014 at 16:08:41 UTC, Israel wrote:On Tuesday, 21 October 2014 at 15:23:11 UTC, David Gileadi wrote:More likely: to give you the ability to shoot yourself in the foot both with a GC and without it. ;)On 10/21/14, 2:47 AM, monarch_dodra wrote:Im curious, will D be one of the first languages to have the ability to use a GC and not use one?Hurp, I wonder why GC issues only appear with application that use a GC. Hurp-a-durp. Also, the issue of memory leak and core dumps seem to only appear when you use a systems language. How crazy is that?Happily with a little work D allows you to have both! :)
Oct 21 2014
On Tue, 21 Oct 2014 16:16:17 +0000 Francesco Cattoglio via Digitalmars-d <digitalmars-d puremagic.com> wrote:More likely: to give you the ability to shoot yourself in the=20 foot both with a GC and without it. ;)wow! so i'll be able shoot away my foot and GC will collect it!
Oct 21 2014
On Tuesday, 21 October 2014 at 16:25:06 UTC, ketmar via Digitalmars-d wrote:On Tue, 21 Oct 2014 16:16:17 +0000 Francesco Cattoglio via Digitalmars-d <digitalmars-d puremagic.com> wrote:YESS!!More likely: to give you the ability to shoot yourself in the foot both with a GC and without it. ;)wow! so i'll be able shoot away my foot and GC will collect it!
Oct 21 2014
On Tuesday, 21 October 2014 at 09:07:04 UTC, ROOAR wrote:This issue sure does seem to crop up in GC world, wonder why.Because it's more commercially successful that way.That company with $2.5 billion can't find competent Java engineers lolz!Or they don't fix problems, which didn't appear.
Oct 24 2014
On Friday, 24 October 2014 at 07:42:16 UTC, Kagamin wrote:On Tuesday, 21 October 2014 at 09:07:04 UTC, ROOAR wrote:That. Minecraft was never expected to be that big.That company with $2.5 billion can't find competent Java engineers lolz!Or they don't fix problems, which didn't appear.
Oct 24 2014
On Tuesday, 21 October 2014 at 07:18:28 UTC, ROOAR wrote:So the latest Minecraft apparently runs really really poorly because of the GC. And it is running on Java desktop. The supposedly "fast" GC of Java can't handle the game anymore-- https://www.reddit.com/r/programming/comments/2jsrif/optifine_dev_minecraft_18_has_so_many_performance/ Take that GC fanatics D needs more action you know.Part of my work is to teach people to use tools like VisualVM, Eclipse MAT and similar and to clean offshore code before it gets integrated into customer premises. Bad code is bad code, regardless of a presence of a GC. Unfortunately a GC that removes bad written code is yet to be invented. -- Paulo
Oct 21 2014
Part of my work is to teach people to use tools like VisualVM,What is this VisualVM you speak of! Off I go!! "Application Developer:... take thread dumps, browse heap dumps" It describes Java perfectly.Also, the issue of memory leak and core dumps seem to only appear when you use a systems language. How crazy is that?GC leaks too bro. Actually probably more common these days than leaking in C++. LOLZ!!
Oct 21 2014
On Tuesday, 21 October 2014 at 07:18:28 UTC, ROOAR wrote:So the latest Minecraft apparently runs really really poorly because of the GC. And it is running on Java desktop. The supposedly "fast" GC of Java can't handle the game anymore-- https://www.reddit.com/r/programming/comments/2jsrif/optifine_dev_minecraft_18_has_so_many_performance/ Take that GC fanatics D needs more action you know.Crazy idea: reach pleayerbase of Minecraft. Hit the same problem with D. Sell it to Microsoft for 2.5B$. Use the money to support D's nogc ;]
Oct 21 2014
On Tuesday, 21 October 2014 at 09:14:00 UTC, Szymon Gatner wrote:Crazy idea: reach pleayerbase of Minecraft. Hit the same problem with D. Sell it to Microsoft for 2.5B$. Use the money to support D's nogc ;]Great plan! Make a DIP! or: 1. mobile chat for Africa, sell to Google for $4B. 2. world of geekcraft, sell to Microsoft for $8B. 3. Cobol to D converter, sell to banks for $16B. 3. facebook for stock investors, IPO for $32B.
Oct 21 2014
On Tuesday, 21 October 2014 at 09:37:32 UTC, Ola Fosheim Grøstad wrote:On Tuesday, 21 October 2014 at 09:14:00 UTC, Szymon Gatner wrote:Not quite sure if you mean actual deals (tho 2 mins of googling confirm my suspicion that you are joking ;) but I certainly wasn't: http://www.theguardian.com/technology/2014/sep/15/microsoft-buys-minecraft-creator-mojang-for-25bn With FB I suspect you mean WatsApp for 22B?Crazy idea: reach pleayerbase of Minecraft. Hit the same problem with D. Sell it to Microsoft for 2.5B$. Use the money to support D's nogc ;]Great plan! Make a DIP! or: 1. mobile chat for Africa, sell to Google for $4B. 2. world of geekcraft, sell to Microsoft for $8B. 3. Cobol to D converter, sell to banks for $16B. 3. facebook for stock investors, IPO for $32B.
Oct 21 2014
On 21/10/2014 10:37 p.m., "Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang gmail.com>" wrote:On Tuesday, 21 October 2014 at 09:14:00 UTC, Szymon Gatner wrote:I'll just put this right here. https://github.com/rikkimax/DobolCrazy idea: reach pleayerbase of Minecraft. Hit the same problem with D. Sell it to Microsoft for 2.5B$. Use the money to support D's nogc ;]Great plan! Make a DIP! or: 1. mobile chat for Africa, sell to Google for $4B. 2. world of geekcraft, sell to Microsoft for $8B. 3. Cobol to D converter, sell to banks for $16B.3. facebook for stock investors, IPO for $32B.
Oct 21 2014
On Tuesday, 21 October 2014 at 10:15:45 UTC, Rikki Cattermole wrote:On 21/10/2014 10:37 p.m., "Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang gmail.com>" wrote:You are not suggesting you sold it for $16B tho, right? ;)On Tuesday, 21 October 2014 at 09:14:00 UTC, Szymon Gatner wrote:I'll just put this right here. https://github.com/rikkimax/DobolCrazy idea: reach pleayerbase of Minecraft. Hit the same problem with D. Sell it to Microsoft for 2.5B$. Use the money to support D's nogc ;]Great plan! Make a DIP! or: 1. mobile chat for Africa, sell to Google for $4B. 2. world of geekcraft, sell to Microsoft for $8B. 3. Cobol to D converter, sell to banks for $16B.
Oct 21 2014
On 21/10/2014 11:24 p.m., Szymon Gatner wrote:On Tuesday, 21 October 2014 at 10:15:45 UTC, Rikki Cattermole wrote:No unfortunately, and not complete. But I more or less did make it ;)On 21/10/2014 10:37 p.m., "Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang gmail.com>" wrote:You are not suggesting you sold it for $16B tho, right? ;)On Tuesday, 21 October 2014 at 09:14:00 UTC, Szymon Gatner wrote:I'll just put this right here. https://github.com/rikkimax/DobolCrazy idea: reach pleayerbase of Minecraft. Hit the same problem with D. Sell it to Microsoft for 2.5B$. Use the money to support D's nogc ;]Great plan! Make a DIP! or: 1. mobile chat for Africa, sell to Google for $4B. 2. world of geekcraft, sell to Microsoft for $8B. 3. Cobol to D converter, sell to banks for $16B.
Oct 21 2014
Why? Wait why? Also Cobol looks horrid. Why is it all caps.3. Cobol to D converter, sell to banks for $16B.I'll just put this right here. https://github.com/rikkimax/Dobol
Oct 21 2014
On Tuesday, 21 October 2014 at 10:25:42 UTC, ROOAR wrote:Also Cobol looks horrid. Why is it all caps.You're kind of new to this "legacy" thing, aren't you? ;) -Wyatt
Oct 21 2014
On 21/10/2014 11:25 p.m., ROOAR wrote:Last semester I had an assignment to port some COBOL code to Python. So of course I did the smart thing. Wrote a compiler to convert it. But for proof of concept straight to D. My tutor of course didn't like it so never finished it. But the parser was great for the documentation generation!Why? Wait why? Also Cobol looks horrid. Why is it all caps.3. Cobol to D converter, sell to banks for $16B.I'll just put this right here. https://github.com/rikkimax/Dobol
Oct 21 2014
On Tuesday, 21 October 2014 at 10:15:45 UTC, Rikki Cattermole wrote:I'll just put this right here. https://github.com/rikkimax/DobolHaha! :-D Cool, or should I say Dool? «Dobol, enjoy the future of the past!» Banks are having trouble finding Cobol programmers. I'm considering learning both Cobol and old hierarchical databases. :^] Actually, that was a joke, but when I come to think about it it actually makes a lot of sense… Hm. On Tuesday, 21 October 2014 at 09:56:51 UTC, Szymon Gatner wrote:Not quite sure if you mean actual deals (tho 2 mins of googling confirm my suspicion that you are joking ;) but I certainly wasn't:Yeah, but considering the insane "big is better" valuations we see these days, I thought the business people migh as well use this simple formula: offer = (last big valuation)*2 ==> 1B, 2B, 4B, 8B, 16B, 32B, 64B.With FB I suspect you mean WatsApp for 22B?Actually I thought about the valuation of FB at 30B, but the WhatsApp purchase is insane! And here I thought SUNs purchase of MySQL for 1B was a bad investment???!??! In perspective, if FB had tried to sell 19B worth of stock, then the prices would have gone down real fast… It is Monopoly money… :-/ Anyhow, youngsters aren't loyal to technology, only old people are. And they go to the "new and cool places". So these things will shift over time. I guess that is why FB is trying to be cool by investing in stuff like 3D headgear and chats…
Oct 21 2014
On Tuesday, 21 October 2014 at 07:18:28 UTC, ROOAR wrote:So the latest Minecraft apparently runs really really poorly because of the GC. And it is running on Java desktop. The supposedly "fast" GC of Java can't handle the game anymore-- https://www.reddit.com/r/programming/comments/2jsrif/optifine_dev_minecraft_18_has_so_many_performance/ Take that GC fanatics D needs more action you know.I don't think the question is whether or not GC is inherently good or bad. The question is what does your application need? If it can live happily with GC, then use GC. If, however, you have a real-time application, where you cannot afford it, avoid it (or at least avoid zillions of new allocations every second). I suppose part of the problem with the Java code you mentioned is that people use textbook "best practices" that look good on paper but can be very inefficient in reality. But this is not really the language's / GC's fault. If people write dull and unimaginative code to the point where the product becomes useless, there is something wrong with the company's culture. I've seen poorly written, inefficient C code too.
Oct 21 2014
Am Tue, 21 Oct 2014 07:18:26 +0000 schrieb "ROOAR" <youwants yahoo.com>:So the latest Minecraft apparently runs really really poorly because of the GC. And it is running on Java desktop. The supposedly "fast" GC of Java can't handle the game anymore-- https://www.reddit.com/r/programming/comments/2jsrif/optifine_dev_minecraft_18_has_so_many_performance/ Take that GC fanaticsSorry to rain on the parade, but the original code by Notch seems to be very careful about real-time game requirements. It is not so much that Minecraft got "so big" that it is stalled by garbage collection. It is the way the new code was written (by freshman programmers?) more in terms of buzz words than with practical considerations in mind. This code would have become slower in any language.D needs more action you know.Yes I know, you know, we all know. Fortunately improving the GC and nogc is one of the two development focuses right now. -- Marco
Oct 21 2014
Eh. All I know is, this version that allegedly has framerates in the territory of 10ish, runs at 200+ for me on seven year old hardware, and I know others with the same experience. Something else is a contributor.
Oct 23 2014