Closed Bug 1040020 Opened 10 years ago Closed 7 years ago

[tarako] Sms app takes too long for cold launch

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:-, b2g-v1.3T affected)

RESOLVED WONTFIX
tracking-b2g -
Tracking Status
b2g-v1.3T --- affected

People

(Reporter: yang.zhao, Unassigned)

References

Details

(Keywords: perf)

1,sms app takes too long for cold launch.
2,Click the new coming message in status bar,it takes too long time to open the message.
Flags: needinfo?(james.zhang)
Flags: needinfo?(james.zhang) → needinfo?(kkuo)
(In reply to yang.zhao from comment #0)
> 1,sms app takes too long for cold launch.

Please define "too long" first

https://datazilla.mozilla.org/b2g/?branch=v1.3t&device=tarako&range=60&test=cold_load_time&app_list=messages,template&app=messages&gaia_rev=f24de71940a6d39b&gecko_rev=7ee1774b1703&plot=avg

The clod launch time for message app was kept between 1050 ms ~ 1100ms for over 2 months, I have no idea why this bug created at this moment...

BTW, message app on v1.3 branch with other device also had around 1000ms for cold launch, so it's not regression apparently.
(In reply to Steve Chung [:steveck](PTO 7/18) from comment #1)
> (In reply to yang.zhao from comment #0)
> > 1,sms app takes too long for cold launch.
> 
> Please define "too long" first
500 messages in sms, it takes about 1600ms for cold launch.
I am not sure whether the way I test is right.Add peipei for help.
@peipei,the data I test is different from mozilla, could you help to verify the cold launch time for sms? Thank you! ^_^

> https://datazilla.mozilla.org/b2g/?branch=v1.
> 3t&device=tarako&range=60&test=cold_load_time&app_list=messages,
> template&app=messages&gaia_rev=f24de71940a6d39b&gecko_rev=7ee1774b1703&plot=a
> vg
> 
> The clod launch time for message app was kept between 1050 ms ~ 1100ms for
> over 2 months, I have no idea why this bug created at this moment...
> 
> BTW, message app on v1.3 branch with other device also had around 1000ms for
> cold launch, so it's not regression apparently.

The second one: 
2,Click the new coming message in status bar,it takes too long to open the message.
It takes nearly 5000ms for launch sms by clicking new message notification in status bar.
Flags: needinfo?(pcheng)
I think the cold launch time in datazilla only count the time from taping on Message icon to Message app was launched. It does not include the time of loading the message list and display.

I enabled "Settings -> Device information -> More information -> Developer -> "show time to load" and did tests with 200 messages for 8 times. The avg load time is 1302ms.

But to fully display the messages, it took longer (over 2s). Displaying the details of each msg conversation is also slow.

Yang, how did you do your test? maybe your concern is the time for displaying all msgs is too long?
Flags: needinfo?(pcheng) → needinfo?(yang.zhao)
I think there is no chance we can improve this in v1.3t without bringing risk. We can investigate the issue with the notification though.

For the second one, can you tell if you're on the homescreen or if you're in another app when you tap the notification? 

A guess: maybe we just started the app and closed the app (we need to close because we use a separate file to handle the incoming messages in order to save memory on Tarako) and as a result the preloaded process is not ready and needs to be completely launched.

Can you confirm you see a different time between if you click on the notification as soon as it's displayed and if you click on the notification after 10 seconds?

If we want to avoid closing ourselves after dispatching the notification, I really fear this will be very risky, and it's quite late to do this now in my opinion...
@peipei
 I just use the Stopwatch to calculate the time from taping on Message icon to Message app was launched.
And I also use your method and test with 500 messages for 10 times.The avg load time is 1396ms.
The time is longer than 1000ms which mentioned in comment 1. And the user experience is not good,users feel it is slow.

I'd like to know do the following time cost could improve?
1.cold launch time for sms
2.Read new message by clicking new message notifications in status bar.The time costs too long,sometimes nearly 5000ms,user experience is bad.

@Julien
 This is the following steps I do for sencond one:
 1.Stays on homescreen with no other app is running at the time.
 2,Send a message to the phone.
 3,Click on the notification as soon as it's displayed.

I test again.It seems that there is not much difference if I click on the notification as soon as it's displayed or click on the notification after 10 seconds.
The time from click the notification to sms launch is around 3000ms,then display the details of the message cost around extra 2000ms.So the total is around 5000ms.
Flags: needinfo?(yang.zhao)
Flags: needinfo?(kkuo)
I enabled "Settings -> Device information -> More information -> Developer -> "show time to load" and did tests with 0 messages for 10 times. The avg load time is 1227.4ms.

However, I also test the Template app(in test_apps folder and no js and css files)for 10 times. The avg load time is 709.8ms.

And, the avg load time of contact is 863.9ms.

So we hope to reduce the load time of sms.
Flags: needinfo?(felash)
Flags: needinfo?(felash)
See Also: → 1041303
Dear Kun Tang, 

First, note that the "avg load time" measurement is useful, but it's also rough. It shows the time until the "onload" event, and this can show wrong measures depending how the app loads files. That's why you see such a difference between the SMS app and the Contacts app.

We can definitely improve things, but this takes time and some background work. We did all the background work for v2.0 and we'll do more in v2.1 (and possibly v2.0 if time allows).

However, I think it's very dangerous to do this _now_ in v1.3t. I prefer an app that works fine but takes 200ms more to load. Moreover, it will take us from other tasks for future versions.

I hope this makes sense to you as this makes sense to me.


(I believe bug 1041303 has been filed to address the "click the notification" issue, so I'm renaming this bug.)
Summary: [tarako]Sms app takes too long for cold launch & Launch sms by clicking new message in status bar also takes too long → [tarako] Sms app takes too long for cold launch
Hi,Julien
  I found that the cold launch time for sms has some relationship with the amount of js files in index.html.I do experiments with the following STR:
   1,Enable "show time to load" in setting app.
   2,Play the same music in background.
   3,Record the sms cold launch time for ten times.(cold launch time method:Kill sms from card view, then launch again.)

   With *ALL* 37 <script> labels in index.html,the ten times for cold launch are:
    1769 1615 1616 1382 1380 1353 1366 1402 1368 1392 
    AVG:1464.3ms

   With *ONLY* first 20 <script> labels in index.html,the ten times for cold launch are:
    1853 1158 1123 1300 1288 1122 1124 1510 1109 1197
    AVG:  1278.4ms

   With *ONLY* last 17 <script> labels in index.html,the ten times for cold launch are:
    1184 1113 1127 1058 1089 1018 1047 1078 1056 1074
    AVG:1084.4ms

   With *NO* <script> labels in index.html,the ten times for cold launch are:
    1243 877 1151 870 869 909 870 900 893 870
    AVG:945.2

So maybe we could change the js load method.FYI.Thank you!
But you understand that we need these scripts to make the application work properly :) So we need to load them before using them.

We did some experiments in the past (see the v1.2 code for example) to remove all script files and lazy load everything instead. But in bug 947234 we saw it was a bad idea and it made the whole process longer (time from "tap the icon" to "display the first thread"). It makes the "cold launch time", as measured, shorter, but for the user, in the end, it's longer.

What we need is lazy load the files only when we need them. This is clearly a long term goal, and I totally agree this is needed because the current situation is not good.

But with the code in v1.3 (and v1.3t, and v1.4), it's difficult to lazy load the files at the right time. As I said, we did some work in v2.0 (bug 881469 especially) that will make it possible to do the "smart lazy load" in v2.1.

I'm sure we could do some improvements in v1.3t if we worked hard. This has the following drawbacks:
* we take time to do tarako-specific work instead of doing it in v2.1.
* there is a significant risk doing this now. If we try to use an object before it's loaded, some functionality will break. This would need massive QA to check this works properly, and I doubt it's the right time for this. As I said, the code in v1.3t is not in a good shape to do this safely in my opinion.

I hope you now understand better the issues we have.
Note: the bug about doing more lazy loading in v2.1 is bug 1009545.
Yang, I'd like to be sure that in comment 8 you tested the app with the optimized JS files (minified and concatenated)?
Flags: needinfo?(yang.zhao)
(In reply to Julien Wajsberg [:julienw] from comment #11)
> Yang, I'd like to be sure that in comment 8 you tested the app with the
> optimized JS files (minified and concatenated)?

I checked it again, and find that it seems without the optimized JS files.I just copy the sms app and install it by app-manager.
Flags: needinfo?(yang.zhao)
Ok thanks, then your results from comment 8 are not surprising at all. We really need to check again with optimized JS files.

With this command run in the gaia directory:

  APP=sms GAIA_OPTIMIZE=1 make install-gaia

You should be able to flash the new version of the application.
Hi zhaoyang & peipei,

   I want to know how did you put 200 or 500 messages into sms.
   Any method shared?
Flags: needinfo?(yang.zhao)
Flags: needinfo?(pcheng)
(In reply to Kun Tang from comment #14)
> Hi zhaoyang & peipei,
> 
>    I want to know how did you put 200 or 500 messages into sms.
>    Any method shared?
you can go to folder gaia/test_media/reference-workload and run makeReferenceWorkload.sh
Flags: needinfo?(yang.zhao)
Flags: needinfo?(pcheng)
(In reply to Kun Tang from comment #14)
> Hi zhaoyang & peipei,
> 
>    I want to know how did you put 200 or 500 messages into sms.
>    Any method shared?
You can go to gaia/test_media/reference-workload,then execute |./makeReferenceWorkload.sh medium|.
You could open the file makeReferenceWorkload.sh to see more detail.If you don't want to put data in other apps,you could modify the 

 medium)
      IMAGE_COUNT=50
      MUSIC_COUNT=50
      VIDEO_COUNT=10
      CONTACT_COUNT=500
      SMS_COUNT=500
      DIALER_COUNT=100
      CAL_COUNT=1300
    ;;

as:
 
   medium)
      IMAGE_COUNT=0
      MUSIC_COUNT=0
      VIDEO_COUNT=0
      CONTACT_COUNT=0
      SMS_COUNT=500
      DIALER_COUNT=0
      CAL_COUNT=0
    ;;
OK, thank zhaoyang & peipei
Not only the load time of sms takes long,but also displaying messages in sms needs long time.
 
I put 36 theads(the 36 threads have 200 messages) into sms, then add some log in homescreen, system and sms app. I found that it tooks more than 5000ms from clicking the sms app to displaying all 36 threads.

By observing log, I think load time of sms, some init functions(example ThreadUI.init()),and TheadListUI. renderTheads() are the main time consuming  points.
In particular renderThreads(),it calls getThreads(). I add log in source code:

var cursor = this._mozMobileMessage.getThreads();
    console.log('[kenny]' + ' [' + Date.now() / 1000 + '] ' + ' getThreads()');
    var each = options.each;
    var end = options.end;
    var done = options.done;

    cursor.onsuccess = function onsuccess() {
      console.log('[kenny]' + ' [' + Date.now() / 1000 + '] ' + ' getThreads() onSuccess begin');
      if (this.result) {

        if (this.result.participants != 10086) {
          // Register all threads to the Threads object.
          Threads.set(this.result.id, this.result);

          // If one of the requested threads is also the
          // currently displayed thread, update the header immediately
          if (this.result.id === Threads.currentId) {
            ThreadUI.updateHeaderData();
          }

          each && each(this.result);
        }
          this.continue();
          console.log('[kenny]' + ' [' + Date.now() / 1000 + '] ' + ' getThreads() onSuccess before return');
          return;
      }

      end && end();
      done && done();
      console.log('[kenny]' + ' [' + Date.now() / 1000 + '] ' + ' getThreads() onSuccess end');
    };

*************************
And the logs :
08-17 15:13:12.880 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/startup.js:50 in initUIApp: [kenny] [1345230792.485]  sms startup initUIpp before TimeHeaders.init()
08-17 15:13:12.890 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/startup.js:52 in initUIApp: [kenny] [1345230792.488]  sms startup initUIpp after TimeHeaders.init() before ActivityHandler.init();
08-17 15:13:12.890 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/startup.js:56 in initUIApp: [kenny] [1345230792.505]  sms startup initUIpp after ActivityHandler.init() before ThreadUI.init()
08-17 15:13:12.890 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/startup.js:58 in initUIApp: [kenny] [1345230792.633]  sms startup initUIpp after ThreadUI.init() before ThreadListUI.init()
08-17 15:13:12.890 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/startup.js:60 in initUIApp: [kenny] [1345230792.637]  sms startup initUIpp after ThreadListUI.init() before ThreadListUI.renderThreads
08-17 15:13:12.900 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:310 in mm_getThreads: [kenny] [1345230792.643]  getThreads()
08-17 15:13:12.900 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/startup.js:62 in initUIApp: [kenny] [1345230792.644]  sms startup initUIpp after ThreadListUI.renderThreads before Settings.init()
08-17 15:13:12.900 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/startup.js:65 in initUIApp: [kenny] [1345230792.685]  sms startup initUIpp after Settings.init() before SMSDraft.init()
08-17 15:13:12.900 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/startup.js:67 in initUIApp: [kenny] [1345230792.698]  sms startup initUIpp after SMSDraft.init()
08-17 15:13:13.050 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230792.947]  getThreads() onSuccess begin
08-17 15:13:13.050 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230793.052]  getThreads() onSuccess before return
08-17 15:13:13.100 I/Gecko   (   85): ContactDB: normalized filterValue is empty, can't perform match search.
08-17 15:13:13.220 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230793.097]  getThreads() onSuccess begin
08-17 15:13:13.220 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230793.117]  getThreads() onSuccess before return
08-17 15:13:13.240 I/Gecko   (   85): ContactDB: normalized filterValue is empty, can't perform match search.
08-17 15:13:13.300 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230793.234]  getThreads() onSuccess begin
08-17 15:13:13.300 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230793.255]  getThreads() onSuccess before return
08-17 15:13:13.430 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230793.309]  getThreads() onSuccess begin
08-17 15:13:13.430 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230793.334]  getThreads() onSuccess before return
08-17 15:13:13.540 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230793.445]  getThreads() onSuccess begin
08-17 15:13:13.540 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230793.478]  getThreads() onSuccess before return
08-17 15:13:13.620 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230793.55]  getThreads() onSuccess begin
08-17 15:13:13.630 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230793.582]  getThreads() onSuccess before return
08-17 15:13:13.730 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230793.635]  getThreads() onSuccess begin
08-17 15:13:13.730 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230793.664]  getThreads() onSuccess before return
08-17 15:13:13.810 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230793.743]  getThreads() onSuccess begin
08-17 15:13:13.810 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230793.772]  getThreads() onSuccess before return
08-17 15:13:13.890 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230793.823]  getThreads() onSuccess begin
08-17 15:13:13.890 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230793.854]  getThreads() onSuccess before return
08-17 15:13:13.960 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230793.898]  getThreads() onSuccess begin
08-17 15:13:13.960 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230793.927]  getThreads() onSuccess before return
08-17 15:13:14.060 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230793.973]  getThreads() onSuccess begin
08-17 15:13:14.060 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230794.012]  getThreads() onSuccess before return
08-17 15:13:14.150 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230794.068]  getThreads() onSuccess begin
08-17 15:13:14.150 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230794.101]  getThreads() onSuccess before return
08-17 15:13:14.230 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230794.158]  getThreads() onSuccess begin
08-17 15:13:14.230 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230794.19]  getThreads() onSuccess before return
08-17 15:13:14.310 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230794.24]  getThreads() onSuccess begin
08-17 15:13:14.310 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230794.274]  getThreads() onSuccess before return
08-17 15:13:14.420 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230794.322]  getThreads() onSuccess begin
08-17 15:13:14.420 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230794.349]  getThreads() onSuccess before return
08-17 15:13:14.490 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230794.428]  getThreads() onSuccess begin
08-17 15:13:14.490 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230794.459]  getThreads() onSuccess before return
08-17 15:13:14.570 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230794.499]  getThreads() onSuccess begin
08-17 15:13:14.570 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230794.53]  getThreads() onSuccess before return
08-17 15:13:14.650 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230794.582]  getThreads() onSuccess begin
08-17 15:13:14.650 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230794.611]  getThreads() onSuccess before return
08-17 15:13:14.740 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230794.662]  getThreads() onSuccess begin
08-17 15:13:14.740 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230794.69]  getThreads() onSuccess before return
08-17 15:13:14.820 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230794.748]  getThreads() onSuccess begin
08-17 15:13:14.820 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230794.774]  getThreads() onSuccess before return
08-17 15:13:14.910 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230794.83]  getThreads() onSuccess begin
08-17 15:13:14.910 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230794.865]  getThreads() onSuccess before return
08-17 15:13:14.980 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230794.921]  getThreads() onSuccess begin
08-17 15:13:14.980 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230794.948]  getThreads() onSuccess before return
08-17 15:13:15.090 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230794.989]  getThreads() onSuccess begin
08-17 15:13:15.090 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230795.014]  getThreads() onSuccess before return
08-17 15:13:15.170 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230795.098]  getThreads() onSuccess begin
08-17 15:13:15.170 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230795.126]  getThreads() onSuccess before return
08-17 15:13:15.260 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230795.183]  getThreads() onSuccess begin
08-17 15:13:15.260 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230795.211]  getThreads() onSuccess before return
08-17 15:13:15.380 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230795.272]  getThreads() onSuccess begin
08-17 15:13:15.390 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230795.34]  getThreads() onSuccess before return
08-17 15:13:15.470 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230795.397]  getThreads() onSuccess begin
08-17 15:13:15.470 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230795.424]  getThreads() onSuccess before return
08-17 15:13:15.540 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230795.476]  getThreads() onSuccess begin
08-17 15:13:15.550 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230795.506]  getThreads() onSuccess before return
08-17 15:13:15.630 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230795.555]  getThreads() onSuccess begin
08-17 15:13:15.630 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230795.584]  getThreads() onSuccess before return
08-17 15:13:15.730 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230795.636]  getThreads() onSuccess begin
08-17 15:13:15.730 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230795.665]  getThreads() onSuccess before return
08-17 15:13:15.850 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230795.74]  getThreads() onSuccess begin
08-17 15:13:15.850 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230795.771]  getThreads() onSuccess before return
08-17 15:13:15.940 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230795.857]  getThreads() onSuccess begin
08-17 15:13:15.940 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230795.903]  getThreads() onSuccess before return
08-17 15:13:16.020 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230795.946]  getThreads() onSuccess begin
08-17 15:13:16.020 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230795.974]  getThreads() onSuccess before return
08-17 15:13:16.090 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230796.027]  getThreads() onSuccess begin
08-17 15:13:16.090 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230796.056]  getThreads() onSuccess before return
08-17 15:13:16.160 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230796.101]  getThreads() onSuccess begin
08-17 15:13:16.160 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230796.131]  getThreads() onSuccess before return
08-17 15:13:16.220 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230796.175]  getThreads() onSuccess begin
08-17 15:13:16.220 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:332 in onsuccess: [kenny] [1345230796.197]  getThreads() onSuccess before return
08-17 15:13:16.290 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:316 in onsuccess: [kenny] [1345230796.253]  getThreads() onSuccess begin
08-17 15:13:16.290 E/GeckoConsole(  363): Content JS LOG at app://sms.gaiamobile.org/js/message_manager.js:338 in onsuccess: [kenny] [1345230796.268]  getThreads() onSuccess end
From comment 18 & 19,

    It tooks long time when loading sms app and displaying all threads on screen. User experience is not good.

    Can we investigate them?
Flags: needinfo?(felash)
We already know all this, Ken.

So what do you suggest? Should we break everything now on Tarako? Or should we ship with this good enough implementation and improve in future versions?

When launching the app, the user will likely:

1. start a new message
2. open one of the recent threads because
 2a. there is a new message
 2b. they are friends

On Tarako, we need 6 threads (at most) to cover the first panel. This means that from the user point of view, the app is usable at the 6th getThreads success. That's less than 1 sec after your first log.

We can do better, we will do better, but please, let's not waste more time on this now.
Flags: needinfo?(felash)
Hi Julien Wajsberg,

   I am sorry to trouble you again. 
   Our customers care about this issue. I understand you,but our customers won‘t understand me.

   So if you have no time to do this, can you share us your opinions(or what will you do to improve it on v2.0 or v2.1) about it. May be we can try ourselves.

   Thank you.
Dear Kun Tang, I'd first like precise expectations. In this whole bug, I didn't see any expectations, I only see "it's slow".

So we need expectactions before moving forward. Expectations for:
* time to display chrome
* time to display first thread
* time to display all threads in first page
* time to display all threads

And compared with the current measurements.

Thanks.
hi,Tzu-Lin
  In bug 1041303,I think the time cost could divide into two parts:
  1.cold launch time for sms
  2.the time for displaying the detail.With 1000 messages in sms,it takes more than 2 seconds to display the detail after you click a message thread.

So the patch in bug 1041303 did shorten the time,but it still takes around 3 seconds from tapping the new SMS notification in utility tray to display the message detail.FYI.
Is your main use case "clicking on a notification", and so the time you're measuring is from "clicking a notification" to "displaying the correct thread"?

If this is the main use case you want now, I think we can try to improve it using shortcuts.
Dear Julien Wajsberg,

   Now the case only have one:sms has only one thread and the thread has 100 messages, the time we're measuring is from "clicking the sms" to "displaying the thread".

   Now it needs 2900ms, and we hope to improve it 1000ms.
(In reply to Kun Tang from comment #26)
> Dear Julien Wajsberg,
> 
>    Now the case only have one:sms has only one thread and the thread has 100
> messages, the time we're measuring is from "clicking the sms" to "displaying
> the thread".
> 
>    Now it needs 2900ms, and we hope to improve it 1000ms.

May I know where you insert the log for the result?
(In reply to Kun Tang from comment #26)
> Dear Julien Wajsberg,
> 
>    Now the case only have one:sms has only one thread and the thread has 100
> messages, the time we're measuring is from "clicking the sms" to "displaying
> the thread".

"clicking the sms" is still "clicking the notification", right ?

> 
>    Now it needs 2900ms, and we hope to improve it 1000ms.
(In reply to Steve Chung [:steveck] from comment #27)
> (In reply to Kun Tang from comment #26)
> > Dear Julien Wajsberg,
> > 
> >    Now the case only have one:sms has only one thread and the thread has 100
> > messages, the time we're measuring is from "clicking the sms" to "displaying
> > the thread".
> > 
> >    Now it needs 2900ms, and we hope to improve it 1000ms.
> 
> May I know where you insert the log for the result?

The result is not obtained by insert log. QA capture the video when he test this case, and then he calculate the result according the frame of video.

And QA hopes the result is 1000ms from “clicking the sms” to “displaying the thread”.
(In reply to Julien Wajsberg [:julienw] from comment #28)
> (In reply to Kun Tang from comment #26)
> > Dear Julien Wajsberg,
> > 
> >    Now the case only have one:sms has only one thread and the thread has 100
> > messages, the time we're measuring is from "clicking the sms" to "displaying
> > the thread".
> 
> "clicking the sms" is still "clicking the notification", right ?
> 
> > 
> >    Now it needs 2900ms, and we hope to improve it 1000ms.

No.
I am not talking about "clicking the notification".
"clicking the sms" is "clicking sms icon on homescreen".

Our customers has the case : sms has only one thread and the thread has 100 messages, the time we're measuring is from "clicking the sms" to "displaying the thread".

Now it needs 2900ms, and we hope to improve it be 1000ms.
We're likely not going to and prefer not to add more change on 1.3t here.

Kun Tang, please ask Jason to speak to me if you want to insist on this case.
Flags: needinfo?(kun.tang)
(In reply to Kun Tang from comment #30)
> (In reply to Julien Wajsberg [:julienw] from comment #28)
> > (In reply to Kun Tang from comment #26)
> > > Dear Julien Wajsberg,
> > > 
> > >    Now the case only have one:sms has only one thread and the thread has 100
> > > messages, the time we're measuring is from "clicking the sms" to "displaying
> > > the thread".
> > 
> > "clicking the sms" is still "clicking the notification", right ?
> > 
> > > 
> > >    Now it needs 2900ms, and we hope to improve it 1000ms.
> 
> No.
> I am not talking about "clicking the notification".
> "clicking the sms" is "clicking sms icon on homescreen".
> 
> Our customers has the case : sms has only one thread and the thread has 100
> messages, the time we're measuring is from "clicking the sms" to "displaying
> the thread".

"displaying the thread" means "displaying the thread's content", or "displaying the thread list, with the clickable thread summary" ?

If it's "displaying the thread's content", then I don't understand how you measure it, because you need a "tap" action to display it.
(In reply to Wayne Chang [:wchang] from comment #31)
> We're likely not going to and prefer not to add more change on 1.3t here.
> 
> Kun Tang, please ask Jason to speak to me if you want to insist on this case.

OK,my leader will talk about jason. thanks
Flags: needinfo?(kun.tang)
(In reply to Julien Wajsberg [:julienw] from comment #32)
> (In reply to Kun Tang from comment #30)
> > (In reply to Julien Wajsberg [:julienw] from comment #28)
> > > (In reply to Kun Tang from comment #26)
> > > > Dear Julien Wajsberg,
> > > > 
> > > >    Now the case only have one:sms has only one thread and the thread has 100
> > > > messages, the time we're measuring is from "clicking the sms" to "displaying
> > > > the thread".
> > > 
> > > "clicking the sms" is still "clicking the notification", right ?
> > > 
> > > > 
> > > >    Now it needs 2900ms, and we hope to improve it 1000ms.
> > 
> > No.
> > I am not talking about "clicking the notification".
> > "clicking the sms" is "clicking sms icon on homescreen".
> > 
> > Our customers has the case : sms has only one thread and the thread has 100
> > messages, the time we're measuring is from "clicking the sms" to "displaying
> > the thread".
> 
> "displaying the thread" means "displaying the thread's content", or
> "displaying the thread list, with the clickable thread summary" ?
> 
> If it's "displaying the thread's content", then I don't understand how you
> measure it, because you need a "tap" action to display it.


“dispalying the thread” means “displaying the thread-list-ui”. Test step:
1)click the sms icon on HomeScreen(begin time)
2) after step 1, system will lunch sms app until displaying all thread in thread-list-ui

the sms only has 1 thread(while the thread has 100 messages). Our case is from “clicking sms app icon on homescreen” to "displaying the thead(not the 100 messages)"
tracking-b2g: --- → -
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Mass closing of Gaia::SMS bugs. End of an era :(
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Mass closing of Gaia::SMS bugs. End of an era :(
You need to log in before you can comment on or make changes to this bug.