Yes. You have to start a webbrowser control, which reads the JS code and compiles it every time it runs, additionally the added sandboxing and abstractions (that are unnecessary in this case) also add to power usage and lower performance.
A better solution would have been something like OpenGL.
A better solution would have been something like OpenGL.