Comments (9)
As above, I wonder that iOS native supports wasm ?
No. V8 wasm depends on JIT enabled.
from cocos-engine.
https://groups.google.com/g/v8-reviews/c/2q_SKUw5ufk/m/e6QOej87AAAJ
As above, I wonder that iOS native supports wasm ? @dumganhar
from cocos-engine.
As we known, V8 in ios platform does not have jit and wasm is not supported either. We found that with the complexity of business logic, the execution efficiency of js on the iOS platform is also significantly reduced. We have compiled the v8 engine(version 9.1.269 at cocos engine 3.7.2) . And use instrument to view cpu consumption with jit compiled version and jitless compiled version.
I found that it costs much more cpu in jitless version than jit version. Can you give us some suggestions to improve performance degradation caused by V8 engine not having jit. @dumganhar @jareguo @minggo
from cocos-engine.
There is not a good way to fix the jitless issue. If possible, you can implement these codes in c++, and used in javascript.
from cocos-engine.
There is not a good way to fix the jitless issue. If possible, you can implement these codes in c++, and used in javascript.
@minggo Thank you for your professional reply, but I think our business logic is not particularly complex, but the CPU peak is still quite high, accompanied by frame drops and heat generation.
After research, I learned that currently only Apple's own WKWebview has JIT capabilities on the iOS platform. Although WKWebview is not a js runtime environment, js code can be executed through the evaluateJavaScript interface. I would like to ask whether cocos engine could replace the V8 engine on the iOS platform. Is it feasible to explain js programs for WKWebview? I think it is a big project. I would like to know if this is done, is there any other big resistance in cocos?
from cocos-engine.
As i know, WKWebview uses jscore which is jit enabled, as WKWebview is implemented by apple. Other apps can use jscore too, but it is jit disabled. cocos supported jscore in early versions, but its performance is bad than v8 core. So cocos uses v8 for all platforms.
from cocos-engine.
As i know, WKWebview uses jscore which is jit enabled, as WKWebview is implemented by apple. Other apps can use jscore too, but it is jit disabled. cocos supported jscore in early versions, but its performance is bad than v8 core. So cocos uses v8 for all platforms.
Thanks for your detailed answer, @minggo. Yes, I agree with what you said. In addition, I am wondering if there is a way to combine cocos engine and WKWebview, such as using the evaluateJavaScript interface to execute js code and use XMLHttpRequest to communicate with native to allow iOS cocos engine to use jit optimization ?
from cocos-engine.
As i know, WKWebview uses jscore which is jit enabled, as WKWebview is implemented by apple. Other apps can use jscore too, but it is jit disabled. cocos supported jscore in early versions, but its performance is bad than v8 core. So cocos uses v8 for all platforms.
Thanks for your detailed answer. Yes, I agree with what you said. In addition, I am wondering if there is a way to combine cocos engine and WKWebview, such as using the evaluateJavaScript interface to execute js code and use XMLHttpRequest to communicate with native to allow iOS cocos engine to use jit optimization ? how about this idea? Is it feasible from a technical perspective in cocos creator engine? @minggo @jareguo
from cocos-engine.
If you want to use WKWebview, then you can just export the program as a web app which can run in WKWebView. But it turns to be a web game. I don't think WKWebview can communicate with cocos engine.
from cocos-engine.
Related Issues (20)
- Support `reverse` functionality for Tween
- Chrome Debug Task cannot debug engine code HOT 7
- spine隐藏时调用setAnimation报错 HOT 2
- The same 3D scene 3.8.3 takes up 90MB more memory than Unity 2021 HOT 5
- taobao Platform can not trigger clearLRU
- 当一个bundle中包含 "排除" 设置时, 不管这个bundle内容是否改变. 每次build后, 都会生成新的config.json HOT 2
- 希望能支持 新版本 (24,25,26)的 Android NDK HOT 2
- 编辑器中, 无法定位 预制体上 龙鼓组件的 json 文件
- 单选框添加必须选中一个选项的功能
- 资源在不同AssetBundle优先级中归属问题
- shader能内置个世界矩阵的逆矩阵吗? 翻了文档和源码都没有找到
- [native] Keep the same behavior of Promise rejection and multiple resolve as nodejs and web
- [bug] The generated JS code format was changed in v3.8.3
- Editor tool for collect shader variants information in the whole project, and runtime preload api for collected variants.
- 关于 cocos编译后的微信小游戏的 window未定义 的错误.
- 希望在 cc的宏可用, 但是引擎以及canvas尚未初始化时, 加入一个hook节点, 可以让开发者来修改 宏.
- 【BUG】3.8.3 bundle独立构建有问题
- [3.8.3] Custom gpu particle shader effect render error
- [3.8.3] if use CustomRendererPipeline the gpu particle will render error
- [3.8.x] Mybe the cocos engine can use extension 'KHR_parallel_shader_compile' to optimizethe compilation time of many shaders
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cocos-engine.