Skip to main content
12 events
when toggle format what by license comment
Jul 16, 2020 at 16:44 history edited Sᴀᴍ Onᴇᴌᴀ CC BY-SA 4.0
added 136 characters in body
Jul 15, 2020 at 21:17 history edited Sᴀᴍ Onᴇᴌᴀ CC BY-SA 4.0
deleted 795 characters in body
Jul 15, 2020 at 20:43 history edited Sᴀᴍ Onᴇᴌᴀ CC BY-SA 4.0
added 938 characters in body
Jul 15, 2020 at 20:38 history edited Sᴀᴍ Onᴇᴌᴀ CC BY-SA 4.0
added 938 characters in body
Jul 15, 2020 at 16:18 history edited Sᴀᴍ Onᴇᴌᴀ CC BY-SA 4.0
added 27 characters in body
Jul 15, 2020 at 13:58 history edited Sᴀᴍ Onᴇᴌᴀ CC BY-SA 4.0
added 6 characters in body
Jul 14, 2020 at 23:54 history edited Sᴀᴍ Onᴇᴌᴀ CC BY-SA 4.0
added 46 characters in body
Jul 14, 2020 at 22:42 history edited Sᴀᴍ Onᴇᴌᴀ CC BY-SA 4.0
added 516 characters in body
Jul 14, 2020 at 21:13 comment added Sᴀᴍ Onᴇᴌᴀ okay - I have added a demo with some benchmarking to illustrate that the suggestions lead to lower average executions times for the draw() method - maybe not initially but eventually it becomes true.
Jul 14, 2020 at 21:11 history edited Sᴀᴍ Onᴇᴌᴀ CC BY-SA 4.0
add benchmark to provide proof
Jul 14, 2020 at 0:31 comment added Derek 朕會功夫 Thank you for the answer! I doubt calling the functions with .bind with help with the performance since .draw is only called once per iteration. The browser would optimize it out anyway so it's probably not worth doing these micro-optimizations, though I haven't done any benchmarking on that. Taking a look at my final solution (it's on my homepage), it seems that I solved the problem simply by not calling .rotate and .restore, and instead just do the calculations myself. Saving the entire 2D context is unnecessary, so I just avoided those methods and ended with sub-ms rendering time.
Jul 12, 2020 at 7:23 history answered Sᴀᴍ Onᴇᴌᴀ CC BY-SA 4.0