IV8Executor#toObject cost too much cpu
Closed this issue · 3 comments
Radiums commented
caoccao commented
The overall performance depends on how complicated your objects are. It's similar to JSON.parse
or JSON.stringify
.
There are a few ways to improve the performance.
- Upgrade to the latest version of Javet. Please refer to project JavetPerf for details.
- Use
JavetProxyConverter
wisely. - Write your own converters.
- Have code review with me.
Radiums commented
com.caoccao.javet.interop.converters.JavetObjectConverter
with this convert
why JavetObjectConverter convert with lock and reflect instead Json result parse to JavaObject?
caoccao commented
I guess there might be some misunderstandings between us. Would you mind visiting the discord to discuss with me in detail?