Increase Render Efficiency #10

Open
opened 2018-07-08 16:57:55 +00:00 by marty-oehme · 2 comments
marty-oehme commented 2018-07-08 16:57:55 +00:00 (Migrated from gitlab.com)

currently on every render step the whole canvas gets wiped and then redrawn.

It might be more efficient to only render the parts of the canvas which are actually in need of being redrawn (i.e. cells which changed)

By not updating the whole canvas every frame (through adding a bg colored box) and instead only re-rendering the little squares that need it, we could save a lot of re-rendering work.

An idea would be to keep a list of all squares changed in the last update and re-render them (and their neighbors?) by adding boxes of the background color or cell color respectively. All other boxes are not affected, the overall grid does not need to be redrawn.

Check with profiling first if this actually improves app speed!

currently on every render step the whole canvas gets wiped and then redrawn. It might be more efficient to only render the parts of the canvas which are actually in need of being redrawn (i.e. cells which changed) By not updating the _whole_ canvas every frame (through adding a bg colored box) and instead only re-rendering the little squares that need it, we could save a lot of re-rendering work. An idea would be to keep a list of all squares changed in the last update and re-render them (and their neighbors?) by adding boxes of the background color or cell color respectively. All other boxes are not affected, the overall grid does not need to be redrawn. Check with profiling first if this actually improves app speed!
marty-oehme commented 2018-10-25 15:25:28 +00:00 (Migrated from gitlab.com)

changed milestone to %2

changed milestone to %2
marty-oehme commented 2018-10-25 15:37:34 +00:00 (Migrated from gitlab.com)

changed milestone to %3

changed milestone to %3
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: experiments/cellular-automata#10
No description provided.