|
From: Paul P. <pau...@gm...> - 2020-12-14 02:26:00
|
I don’t know much about Java to WebAssembly only what I’ve read yesterday on the web and the 3 existing projects that aim at doing that (CheerpJ, TeaVM and JWebAssembly). I was amused to find that something had been done for astex viewer as it relates to JMol, but you are entirely right, this is not a viable solution when you need to download 80MB of code to make it « run » (and it is crippled with bugs as well). I just saw this as a proof of concept. I became (again) interested in WebAssembly after I’ve read this piece by a developper trying to improve his JS codebase performance https://engineering.q42.nl/webassembly/ <https://engineering.q42.nl/webassembly/> There are nice takes in this blog post (like the overhead when running emscripten from C++) and I really wanted to try it on one of my projects but I haven’t reach that point yet. So, I don’t have any first hand experience to share on that subject. As for the rendering, I was surprised that in this JS port of astexviewer, the frame rate feels smooth even with antialiasing on, in fullscreen and without leveraging WebGL (without the AA, you can indeed see that the wireframes are drawn without using Canvas2D lines primitives). Performance degrades considerably when shadows are enabled though. What I guess from your answer is that if the major bottleneck is in the rendering, the expected gain from using webassembly would be meagre compared to using other rendering technologies such as WebGL. Thanks for your answer, Paul > Le 13-12-2020 à 18:24, Robert Hanson via Jmol-users <jmo...@li...> a écrit : > > Well, Paul, as a matter of fact.... > > I just got introduced to WASM in relation to InChI creation. I'm impressed. Turns out just this past year a mechanism was developed (LLVM) to compile C++ code directly to Web Assembly, with the simple hooks necessary to access it. It was fun learning how to do this with InChI. > > What do you know about how the Java code was converted to Web Assembly? There could be some good surface calculations that would benefit from that, for sure. Mostly, though, I think the calculations are not the slow part in JSmol. More the rendering. > > Bob > > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users |