Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2152] Android: Loading perf issue (~3 seconds) with XHR to fileSystem test case

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:58:15.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0 M02
ComponentsAndroid
Labelsandroid, android_refactor, filesystem, performance, xhr
ReporterThomas Huelbert
AssigneeDon Thorp
Created2011-04-15T03:12:05.000+0000
Updated2011-04-17T01:58:15.000+0000

Description

1.5.0.70ce98 g2 running 2.2

1.BaseUI>Web Views>XHR to FileSystem
2.tap the test and time how long it takes for the page to load
results:the new window take about 3 seconds to load.

Attachments

FileDateSize
methodtracing.png2011-04-15T03:12:05.000+0000369267

Comments

  1. Marshall Culpepper 2011-04-15

    Where is the 3 second delay occurring? It's possible this can be caused by network speed issues.. do you have any more data about how long it takes on older versions / other devices?

  2. Don Thorp 2011-04-15

    Assigning over so this get seen by Thomas.

  3. Thomas Huelbert 2011-04-15

    Sorry for the delayed response. The 3 seconds is the time from the tap of the menu item ("XHR to FileSystem") and the resulting window showing. So, tap menu item, nothing happens for 3 seconds, then web view opens and loads. No other test cases show this lag. This was erroneously marked as a regression, but it repos in 1.4.1.1, removing tag. Seems like that reduces its priority as well, but I will leave up to you dev guys.

  4. Bill Dawson 2011-04-15

    I'm not sure what to say or do about this item, other than to suggest maybe the iOS native stuff is simply faster. The reason no other test shows this lag is because this one is a bit special: it makes a full HTTP call and creates a file in the phone's file system before even opening the test window. Contrast that with the XHR tests (Platform -> XHR), such as the XML Data test. The XML Data test opens the test window before doing the XHR stuff, because its test window has its own URL (the Webview - XHR-to-Filesystem test does not run the code in a separate JS file -- instead, it calls tab.open(w) to put a window in the current tab.) Therefore there is no delay in feedback to the tester/user in tests such as the XML Data test.

    If I simply change the order of a few lines in the XHR-to-Filesystem test, you at least get (nearly) immediate feedback -- the Google page still loads more slowly than in iOS, but you get feedback. Is that sufficient?

    I also did method tracing (attached image). Nothing really stands out that can be fixed to make this faster. A big chunk of the time is spent in Mozilla HTTP stuff, including a surprising amount of time spent parsing cookies.

    Anyway, check out the change I made, and if it's sufficient let me know (or close).

  5. Bill Dawson 2011-04-15

    BTW, to me, the behavior (speed) under 1.4.1.1 seems the same.

  6. Bill Dawson 2011-04-15

    (from [bad96621cd1a44f6f206cea4d2f15f16d02d5374]) [#2152 state:fixed-in-qa] change order of a few lines of WebView - XHR-to-Filesystem test in order to give quicker feedback to Android users (the Android is slower than the iOS). https://github.com/appcelerator/titanium_mobile/commit/bad96621cd1a44f6f206cea4d2f15f16d02d5374"> https://github.com/appcelerator/titanium_mobile/commit/bad96621cd1a...

  7. Matt Schmulen 2011-04-15

    Not sure what to say about this... ~11 seconds on a google ION (from button press to page load), running 1.6 (Build number DRC83).

JSON Source