I think that working with svg files(vector graphics) can reduce final file sizes a lot. I do not know if it’s possible, but SVG files have "a kind of " XML structure, as is the Synfig animation files.
There is a opensource code that converts synfig animated files( sif) to html5. The name is EaselSif.
Well, just suggesting that maybe if we could work with vector graphics and animations… could be a big jump compared to other engines.