Attempt to improve performance/reliability of JavaScriptCanvas