Re: [racket-users] reducing pauses with incremental GC
An update on incremental mode as of today's snapshot: DrRacket now enables incremental mode when you're editing. Specifically, the editor classes now request incremental mode when you click or type in the editor. This is an experiment to see whether incremental mode improves DrRacket's behavior --- and also whether it increases DrRacket's footprint by too much. If you use a snapshot version of DrRacket, keep an eye on memory use, and let us know if it's a problem. At Wed, 2 Dec 2015 08:44:42 -0700, Matthew Flatt wrote: > The development version of Racket now supports an incremental > garbage-collection mode that can eliminate long pauses in a program. > For example, incremental mode is useful for avoiding pauses in games > and animations. > > For more information, see > > http://goo.gl/rYjTIi > > You can try out incremental mode in a snapshot build: > > http://pre.racket-lang.org/ > > > The `2htdp/universe` library has been updated to request incremental > mode, so a `big-bang` program will automatically use it. The programs > that I've tried experience GC pauses that are bounded by 10ms or so > (when run outside of DrRacket). In v6.3, the same programs see a pair > of 130ms pauses every 2-3 minutes. > > As another example, my son Oliver has a Pict3D-based game that now runs > without big pauses: > > https://spaceorbs.weebly.com/ > https://www.youtube.com/watch?v=mP8ud9Yztz8 > > The game uses a fork of Pict3D (github.com/mflatt/pict3d) where I've > added a `(collect-garbage 'incremental)` call. That changes also makes > animations in my Pict3D-based talk run without big pauses. > > For Oliver's game, each GC pause is usually below 16ms on his machine, > but sometimes between 16ms and 32ms. As a result, the game is still > dropping frames, so it's not yet as good as we want --- but that's much > better than before, and the game is comfortably playable. Further > improvement might be just a matter of tuning the implementation of > incremental mode. > > > There's still room for improvement overall, and your mileage may vary. > If you have an application that needs shorter GC pauses and the current > implementation of incremental mode doesn't work well enough, I'm > interested to hear about it. > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] reducing pauses with incremental GC
Wow, this is great. I just tried it with one of my games that I made with big-bang, and the pauses I was having are completely gone, as far as I can tell. (I was doing quite a bit of copying, so I think the GC was triggering fairly often.) Thanks a lot for this; it’s definitely a big improvement. > On Dec 2, 2015, at 7:44 AM, Matthew Flatt wrote: > > The development version of Racket now supports an incremental > garbage-collection mode that can eliminate long pauses in a program. > For example, incremental mode is useful for avoiding pauses in games > and animations. > > For more information, see > > http://goo.gl/rYjTIi > > You can try out incremental mode in a snapshot build: > > http://pre.racket-lang.org/ > > > The `2htdp/universe` library has been updated to request incremental > mode, so a `big-bang` program will automatically use it. The programs > that I've tried experience GC pauses that are bounded by 10ms or so > (when run outside of DrRacket). In v6.3, the same programs see a pair > of 130ms pauses every 2-3 minutes. > > As another example, my son Oliver has a Pict3D-based game that now runs > without big pauses: > > https://spaceorbs.weebly.com/ > https://www.youtube.com/watch?v=mP8ud9Yztz8 > > The game uses a fork of Pict3D (github.com/mflatt/pict3d) where I've > added a `(collect-garbage 'incremental)` call. That changes also makes > animations in my Pict3D-based talk run without big pauses. > > For Oliver's game, each GC pause is usually below 16ms on his machine, > but sometimes between 16ms and 32ms. As a result, the game is still > dropping frames, so it's not yet as good as we want --- but that's much > better than before, and the game is comfortably playable. Further > improvement might be just a matter of tuning the implementation of > incremental mode. > > > There's still room for improvement overall, and your mileage may vary. > If you have an application that needs shorter GC pauses and the current > implementation of incremental mode doesn't work well enough, I'm > interested to hear about it. > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] reducing pauses with incremental GC
This is awesome, Matthew. Best Christmas ever! Neil V. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] reducing pauses with incremental GC
At Wed, 2 Dec 2015 11:26:05 -0500, Matt Jadud wrote: > "Dad, when are you going to push that incremental GC? I want to move > Space Orbs out of alpha..." Exactly. And there was a game before Space Orbs. He's been waiting for a couple of years. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] reducing pauses with incremental GC
I took a look at the server code, and it made my heart warm to see HtDP patterns so clearly/cleanly expressed. Very cool. I've also been having fun imagining the dinner table conversations... "Dad, when are you going to push that incremental GC? I want to move Space Orbs out of alpha..." Nice work all around. Cheers, M On Wed, Dec 2, 2015 at 10:44 AM, Matthew Flatt wrote: > The development version of Racket now supports an incremental > garbage-collection mode that can eliminate long pauses in a program. > For example, incremental mode is useful for avoiding pauses in games > and animations. > > For more information, see > > http://goo.gl/rYjTIi > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] reducing pauses with incremental GC
Awesome Matthew! Jay On Wed, Dec 2, 2015 at 10:44 AM, Matthew Flatt wrote: > The development version of Racket now supports an incremental > garbage-collection mode that can eliminate long pauses in a program. > For example, incremental mode is useful for avoiding pauses in games > and animations. > > For more information, see > > http://goo.gl/rYjTIi > > You can try out incremental mode in a snapshot build: > > http://pre.racket-lang.org/ > > > The `2htdp/universe` library has been updated to request incremental > mode, so a `big-bang` program will automatically use it. The programs > that I've tried experience GC pauses that are bounded by 10ms or so > (when run outside of DrRacket). In v6.3, the same programs see a pair > of 130ms pauses every 2-3 minutes. > > As another example, my son Oliver has a Pict3D-based game that now runs > without big pauses: > > https://spaceorbs.weebly.com/ > https://www.youtube.com/watch?v=mP8ud9Yztz8 > > The game uses a fork of Pict3D (github.com/mflatt/pict3d) where I've > added a `(collect-garbage 'incremental)` call. That changes also makes > animations in my Pict3D-based talk run without big pauses. > > For Oliver's game, each GC pause is usually below 16ms on his machine, > but sometimes between 16ms and 32ms. As a result, the game is still > dropping frames, so it's not yet as good as we want --- but that's much > better than before, and the game is comfortably playable. Further > improvement might be just a matter of tuning the implementation of > incremental mode. > > > There's still room for improvement overall, and your mileage may vary. > If you have an application that needs shorter GC pauses and the current > implementation of incremental mode doesn't work well enough, I'm > interested to hear about it. > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Jay McCarthy Associate Professor PLT @ CS @ UMass Lowell http://jeapostrophe.github.io "Wherefore, be not weary in well-doing, for ye are laying the foundation of a great work. And out of small things proceedeth that which is great." - D&C 64:33 -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] reducing pauses with incremental GC
The development version of Racket now supports an incremental garbage-collection mode that can eliminate long pauses in a program. For example, incremental mode is useful for avoiding pauses in games and animations. For more information, see http://goo.gl/rYjTIi You can try out incremental mode in a snapshot build: http://pre.racket-lang.org/ The `2htdp/universe` library has been updated to request incremental mode, so a `big-bang` program will automatically use it. The programs that I've tried experience GC pauses that are bounded by 10ms or so (when run outside of DrRacket). In v6.3, the same programs see a pair of 130ms pauses every 2-3 minutes. As another example, my son Oliver has a Pict3D-based game that now runs without big pauses: https://spaceorbs.weebly.com/ https://www.youtube.com/watch?v=mP8ud9Yztz8 The game uses a fork of Pict3D (github.com/mflatt/pict3d) where I've added a `(collect-garbage 'incremental)` call. That changes also makes animations in my Pict3D-based talk run without big pauses. For Oliver's game, each GC pause is usually below 16ms on his machine, but sometimes between 16ms and 32ms. As a result, the game is still dropping frames, so it's not yet as good as we want --- but that's much better than before, and the game is comfortably playable. Further improvement might be just a matter of tuning the implementation of incremental mode. There's still room for improvement overall, and your mileage may vary. If you have an application that needs shorter GC pauses and the current implementation of incremental mode doesn't work well enough, I'm interested to hear about it. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.