5/9/2023 0 Comments Javascript swf viewer![]() ![]() The applications of Flash make it a better candidate for native code instead of the performance wreck of a from-scratch JIT-on-JIT solution. They don't include animations, they don't accept user input, they don't connect to servers and stream files and send updates, and they definitely don't run real-time graphics code or path finding and collision detection algorithms. A PDF file is just words and pictures on a page, same thing browsers have always done. ![]() There's a big difference between displaying a PDF file in JavaScript and compiling and displaying an active, real-time Flash game in JavaScript. But I agree there are tradeoffs and benefits the other way too. ![]() So there are very good reasons for going this route. In addition, the C++ code must be secured too which takes effort and introduces risk. The browser already has a dynamic language JIT (for JS), so using that instead of adding an entire new one is far preferable. Sandboxing is the big problem though: A fast ActionScript implementation must have a JIT, and JITs are extremely hard to secure. Portability might be the simpler of the two, but it is still not trivial these days to maintain a single C++ codebase across multiple compilers and OSes. Plus, the native code is nonportable and nonsandboxed. So yes, the C++ might be faster than JavaScript, but the graphics might end up making it less performant overall. Taking LightSpark or Gnash would not give you something that integrates in an optimal way with the browser's hardware accelerated graphics systems, you would need to do a lot of plumbing for that. Performance is bad enough without putting the JavaScript intermediary in thereįlash performance is a combination of code and graphics. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |