You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(copy the content of the code block and run pbpaste | git apply in your terminal to make this change)
It reports many deallocations. The thing that caught my attention was the repeated deallocation of functions (like toString and hasOwnProperty). I wonder if there’s a way to recognize functions that are part of the JavaScript language and either dynamically call them when needed or mark them so they don’t get released.
The text was updated successfully, but these errors were encountered:
I also wonder if we could improve performance by having another Swift → JS calling convention without a return value that avoids the shuffling of memory there.
I imagine maintaining a cache of JS functions (a dictionary from their names to function references) could work, but this would prevent monkey patching on the JS side from working. Which is not a great practice anyway, so maybe a cache is fine? 🤔
I made a small change to report whenever an object ref is deleted:
(copy the content of the code block and run
pbpaste | git apply
in your terminal to make this change)It reports many deallocations. The thing that caught my attention was the repeated deallocation of functions (like toString and hasOwnProperty). I wonder if there’s a way to recognize functions that are part of the JavaScript language and either dynamically call them when needed or mark them so they don’t get released.
The text was updated successfully, but these errors were encountered: