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
TiAPI: App launch slowed down by 2-5 seconds in SDK 8 #10640
Conversation
cc @hansemannn |
Tests:
|
35145ee
to
e7d4205
Compare
no tests as we already have a good suite of tests around require (which caught a bug during the process!) Note to reviewer(s)/QE: I'd prefer to merge this myself so I can squash it and get the message/body correct. |
@sgtcoolguy im getting the following error with this PR build and app stuck at the splash screen DEBUG] : Loading: /var/containers/Bundle/Application/665A2CF9-ED9D-472F-86B4-80476F7B74E3/K2test.app/ti.main.js, Resource: ti_main_js |
Code in general looks good, however i'm also getting the above error on a device build. Simulator works fine though. |
Looks like this is due to encrypted assets being renamed during the build. So the file |
Generate an index of js/json files (_index_.json) packaged into the app for faster existence checks/reading. Generate index when running local dev xcode build using node script. Fixes TIMOB-26742
69a002c
to
d8bddd8
Compare
ok, I rebase all the commits down to one with a proper commit message. I included the fix for encrypted JS/JSON assets being required (tested on my local device). I also renamed the file we write to be |
@@ -31,6 +31,45 @@ | |||
//Defined private method inside TiBindingRunLoop.m (Perhaps to move to .c?) | |||
void TiBindingRunLoopAnnounceStart(TiBindingRunLoop runLoop); | |||
|
|||
typedef NS_ENUM(NSInteger, FileStatus) { | |||
DoesntExist, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only code style, but usually in ObjC, the enumeration cases are prefixed with the enumeration itself, e.g. FileStatusDoesntExist.
FR Passed. |
Manually merging... |
JIRA: https://jira.appcelerator.org/browse/TIMOB-26742
Description:
This is a performance fix to improve iOS require behavior to be more in line with Android's.
On Hans' app, this took startup from 5.5 seconds to load app.js down to ~400-500ms for me. For reference, Android takes roughly ~217ms.
The general theme here is to: