Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26917] iOS: App builds containing large amounts of JS files are extremely slow

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2019-03-27T16:49:50.000+0000
Affected Version/sRelease 6.2.1, Release 8.0.0, Release 7.5.0
Fix Version/sRelease 8.0.1
ComponentsiOS
Labelsbuild-time, engSchedule, ios
ReporterHans Knöchel
AssigneeChristopher Williams
Created2019-03-21T19:34:14.000+0000
Updated2019-04-30T08:53:02.000+0000

Description

Our CLI builds process JS files in series, and differ between platforms versus how they compare the contents to determine how to proceed. Both platforms read in the source JS file and transpile it. iOS then does a check for the destination path to see if it exists, and if so to read that in and compare versus the transpiled contents. If they differ, it writes it out. Android checks the original source against the transpired. If they don't differ and we're on MacOS/Linux we symlink the original src file. Otherwise, we write the new contents out. The Android approach appears to be significantly faster, though it's unclear if either approach is "correct". Ideally we'd do a little of both - symlink when transpilation does not affect the source, don't write to destination file if we'd just be writing the same contents, etc. Fixing all of that logic properly is. larger task... But, moving to processing the JS files in parallel has significant performance gains on iOS in particular.

Comments

  1. Christopher Williams 2019-03-21

    I have manually merged this perf fix to master branch. I think it's a small enough change and has a significant improvement in timings, so should be considered for 8.0.1.
  2. Christopher Williams 2019-03-22

    Merged to 8_0_X as well.
  3. Lokesh Choudhary 2019-03-27

    Verified the fix with SDK 8.0.1.v20190327083138. Checked with KS v2. Closing. Build timings: 1. SDK 8.0.0.GA : * First build 33s * Rebuild : 9s 2. SDK 8.0.1.v20190327083138 : * First build: 25s * Rebuild: 6s

JSON Source