Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UE] 优化:去掉动态v8::External的使用 #1497

Closed
chexiongsheng opened this issue Aug 31, 2023 · 3 comments
Closed

[UE] 优化:去掉动态v8::External的使用 #1497

chexiongsheng opened this issue Aug 31, 2023 · 3 comments
Assignees

Comments

@chexiongsheng
Copy link
Collaborator

审视v8::External的使用是不是必要的,v8::External会给快照特性带来麻烦

@chexiongsheng
Copy link
Collaborator Author

chexiongsheng commented Sep 4, 2023

主要是会动态生成和被gc的地方需要优化:

@chexiongsheng chexiongsheng changed the title [UE] 减少v8::External的使用 [UE] 优化去掉动态v8::External的使用 Sep 4, 2023
@chexiongsheng chexiongsheng changed the title [UE] 优化去掉动态v8::External的使用 [UE] 优化:去掉动态v8::External的使用 Sep 4, 2023
@chexiongsheng
Copy link
Collaborator Author

chexiongsheng commented Sep 5, 2023

Delegate里主要是希望建立js Function到UDynamicDelegateProxy的一一映射。用的是v8::Map来存放,因为v8::Global默认不能做key(没有比较重载,虽说自己可以写个,但既然v8没提供,可能是不建议这么干)。

@chexiongsheng chexiongsheng self-assigned this Sep 5, 2023
@chexiongsheng
Copy link
Collaborator Author

目前剩下toManualReleaseDelegate会有因业务生成的v8::External,其它都是puerts内部使用,比如wrapper的实现,如果v8::Function没有索引的支持,toManualReleaseDelegate想不到办法取得。
先关闭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant