Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upPerformance issue with flow #372
Comments
sindikat
changed the title from
Performance issue with containers
to
Performance issue with flow
Aug 26, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
evancz
May 11, 2016
Member
Sorry no one has gotten to this yet! With Elm 0.17, the Graphics.* modules have moved to evancz/elm-graphics so it makes sense to retarget issues there. I hope this will also mean it'll be easier to find folks to help handling them!
|
Sorry no one has gotten to this yet! With Elm 0.17, the |
evancz
closed this
May 11, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sindikat commentedAug 26, 2015
Consider this code (same code on Share-Elm.com):
Run this in elm-lang.org/try and try to move the mouse around. The mouse positions are updated very slowly and CPU usage becomes high. At first I thought it had to do with CSS transform actions
translateXandtranslateY(a different variant of the code creates lots of these for everydiv), but now I suspect it has to do with constantly rewriting the DOM with each mouse movement.Can that be considered a bug that should be fixed for Graphics.Element? (By implementing
virtual-dom-style diffing or something like that?) If not, what is the idiomatic way to create lots of elements usingGraphics.Element.flow, some of which will be changed according to signals? To explain: suppose I have a 2D game with a game grid 10x10, where tiles and objects might change during the game. If I have aviewfunction that constantly redraws the game grid usingflow, I have massive performance problems. But I have no idea how to workaround this, because I have to haveview <~ foldp update model signal(or some form of that) in mymain.