[TIMOB-17892] iOS: Replace custom JSCore with built-in JSCore version
GitHub Issue | n/a |
---|---|
Type | Epic |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-02-01T13:29:49.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 4.1.0 |
Components | iOS |
Labels | n/a |
Reporter | Ingo Muschenetz |
Assignee | Eric Merriman |
Created | 2014-10-23T20:27:34.000+0000 |
Updated | 2018-02-03T14:33:47.000+0000 |
Description
Currently, we ship a custom version of JSCore, built from:
https://github.com/appcelerator/tijscore
Starting in iOS 7, applications can instead use the built-in version of JSCore:
http://www.bignerdranch.com/blog/javascriptcore-and-ios-7/
We should investigate switching this.
Pros:
* Smaller application file size
* Updated JS engine with possible performance improvements
Cons:
* Updated iOS versions could provide breaking changes for your applications
* Possible issues with having to update our debugger and profiling code
PR is here: https://github.com/appcelerator/titanium_mobile/pull/6450
This is a great PR! I love it and it works pretty well already. I have one warning, but i think you already know about it. Using the native JSCore proxies objects are never released. I guess this is simply because KrollFinalizer is never called.
[~farfromrefuge] That's good to hear it is working for you. My understanding is that those proxies would be garbage collected eventually, but not at the speed we did so previously (for the reason you mention). Do you see that happening?
Well in my tests i put a breakpoint in the _destroy method of TiWindowProxy to see when a window is actually released. With TiCore it gets called from the forceGarbageCollectNow as the Javascript will say that the JS window object is released and then call KrollFinalizer With the native JSCore i don't ever get in that function. I have been playing a bit with it but maybe not long enough, will try a little bit more. But honestly i don't see why it would get released as unregisterProxy is never going to be called on the Proxy.
[~farfromrefuge] To confirm, as you using the PR linked above, or TIMOB-18834 and TIMOB-18835? We do expect the proxies to hang around, but we do also expect them to be collected eventually.
@Ingo: I am using the master branch so i am clearly using the PRs from Vishal. I will spend more time on testing.
Resolving this epic, as all sub-tasks including TIMOB-18834 are resolved.