Replies: 3 comments 7 replies
-
I'll try dig into it If I can get the time to. Don't want to promise anything yet though. I'm not a performance specialist. Do we have any benchmark goals or anything or are we just trying to improve the current implementation? |
Beta Was this translation helpful? Give feedback.
6 replies
-
This should be what proxy from valtio should do, why should we get two separate ones to deal with it? |
Beta Was this translation helpful? Give feedback.
1 reply
-
#965 merged. 🎉 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently our
proxySet
andproxyMap
are just an emulation with plain JS object/array.It's because Proxy doesn't support Set and Map natively, and our goal was to provide APIs compatible to Set and Map. @fkhadra implemented the current version and it has been well.
Time has passed since then and we reached Valtio v2. I think it's reasonable to reconsider the implementation of
proxySet
andproxyMap
for performance, which has requested several times. It means it backs up with the nativeSet
andMap
and we trap all methods of them.Would anyone like to dig into it? It would require a decent knowledge of Valtio and the Set/Map APIs.
Beta Was this translation helpful? Give feedback.
All reactions