Closed Bug 852710 Opened 12 years ago Closed 12 years ago

[email] Defer protocol JS load and init

Categories

(Firefox OS Graveyard :: Gaia::E-Mail, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(blocking-b2g:tef+, b2g18 verified, b2g18-v1.0.1 verified)

VERIFIED FIXED
blocking-b2g tef+
Tracking Status
b2g18 --- verified
b2g18-v1.0.1 --- verified

People

(Reporter: jrburke, Assigned: jrburke)

References

Details

Attachments

(3 files)

+++ This bug was initially created as a clone of Bug #814271 +++ This is for tracking the deferred loading of the JS modules for IMAP/SMTP/Activesync when first starting up, originally started as part of #814271.
Pointer to Github pull-request
Comment on attachment 726985 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/jsas/pull/3 Pull request for mozilla-b2g/jsas: By splitting up codepages into separate modules for each variable type, gelam can only load the values it needs on startup and avoid loading wbxml, protocol, and the rest of codepages until later.
Attachment #726985 - Flags: review?(squibblyflabbetydoo)
Blocks: 852226
Nominating for tef? -- this is one of the bugs we're currently working on for 1.0.1 perf improvements (bug 852226).
Assignee: nobody → jrburke
blocking-b2g: --- → tef?
Comment on attachment 727465 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/151 Pull request for mozilla-b2g/gaia-email-libs-and-more: Since the dynamic load introduces a level of indent for some files, it may be easier to do the comparison online on github using the `?w=1` option to remove whitespace diffs. For example: https://github.com/jrburke/gaia-email-libs-and-more/compare/onlinedelay?w=1 Notable changes: * The activesync modules now lazy load wbxml and the activesync/protocol module via "lazyInit" wrapping functions for many of the methods. For activesync/codepages constant values, they now use the more granular activesync/codepages/* modules that were part of a recent mozilla-b2g/jsas commit (and the deps/activesync submodule was updated to this version). * mailapi/activesync/account now has a `withConnection` method that will dynamically create the connection when needed, and the `lazyInit` wrapper functions will call this once the activesync stuff has loaded. * The imap and smtp modules were modified to dynamically load the protocol modules and chew modules just in the methods that needed them. * mailchew-strings is a new module that handles receiving the i18n strings. This allowed delayed loading of mailchew.js since mailapi/mailbridge only needed the strings up front. mailchew was modified to depend on mailchew-strings. * alameda was updated to fix a bug to not fetch duplicate URLs. * end.js was updated to point many modules to the same build layer. This allows the dependencies in the modules to stay granular but still result in layered loads. * scripts/copy-to-gaia.js introduces about seven more build layers, so that loading can be done very granularly, but still in chunks to avoid too many individual script loads. `make all-tests` still shows all tests passing with this change.
Attachment #727465 - Flags: review?(bugmail)
blocking-b2g: tef? → tef+
Comment on attachment 726985 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/jsas/pull/3 (this was r=squib, reflecting reality)
Attachment #726985 - Flags: review?(squibblyflabbetydoo) → review+
Comment on attachment 727465 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/151 r=asuth with requested changes on pull request, good to land.
Attachment #727465 - Flags: review?(bugmail) → review+
Comment on attachment 727873 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/8751 Pull request that brings these gelam changes: mozilla-b2g/gaia-email-libs-and-more#151 into gaia. r=asuth as indicated in the above pull request.
Changes have landed in gaia and gelam master. As mentioned originally in Bug #814271, time to seeing messages went from 2800 ms range to 2300 ms range with these changes. For Gaia: Pull request: https://github.com/mozilla-b2g/gaia/pull/8751 Commit: https://github.com/mozilla-b2g/gaia/commit/0ab2773d3af8721e9ef05d1a5f47a3523b0aee25 For GELAM: Pull request: https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/151 Commit: https://github.com/mozilla-b2g/gaia-email-libs-and-more/commit/3fc61de7a169aad186db06771cdf7fa3d4b37844
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 853908
NOTE: if the changes in this ticket are uplifted, be sure to include the gaia change that fixes 853908: Pull request: https://github.com/mozilla-b2g/gaia/pull/8769 Merge commit: https://github.com/mozilla-b2g/gaia/commit/1ff80f302d47527abb9030f79b2099d97daa029e
I was not able to uplift this bug to v1-train and v1.0.1. If this bug has dependencies which are not marked in this bug, please comment on this bug. If this bug depends on patches that aren't approved for v1-train and v1.0.1, we need to re-evaluate the approval. Otherwise, if this is just a merge conflict, you might be able to resolve it with: git checkout v1-train git cherry-pick -x -m1 1ff80f302d47527abb9030f79b2099d97daa029e <RESOLVE MERGE CONFLICTS> git commit git checkout v1.0.1 git cherry-pick -x $(git log -n1 v1-train)
John, there are both commits 0ab2773d3af8721e9ef05d1a5f47a3523b0aee25 (this bug) and 1ff80f302d47527abb9030f79b2099d97daa029e (bug 853908), that may be why you got a conflict.
Flags: needinfo?(jhford)
(In reply to Julien Wajsberg [:julienw] from comment #14) > John, there are both commits 0ab2773d3af8721e9ef05d1a5f47a3523b0aee25 (this > bug) and 1ff80f302d47527abb9030f79b2099d97daa029e (bug 853908), that may be > why you got a conflict. So we either need to tef+ bug 853908 or tef- this bug.
Flags: needinfo?(jhford)
Bug 853908 just got tefplussed :-)
Flags: needinfo?(jhford)
Can you please provide steps to verify this fix - as we will blackbox test from the UI?
The main goal of this change was to speed up time between first load and seeing first messages on a cold start by delaying the load of some code. It may be hard to measure just by UI testing, but messages should appear sooner, up to a half-second sooner than before this change. To test it is working correctly and did not introduce any regressions: * Configure an imap account, verify first sync goes well. * Kill email app. * Relaunch. Make sure UI still shows up as before. * Click on menu to go to another folder, or click the sync button. * If in another folder, messages should appear. If syncing and you know there are new messages, they should show up. Also try with an activesync account, like hotmail, and an account that does not match an autoconfig setup (for instance a google apps for domains, using a domain that is not a google domain).
Whiteboard: QARegressExclude
No Test case creation is needed in moztrap for this issue.
Flags: in-moztrap-
Blocks: 850904
Uplifted commit 0ab2773d3af8721e9ef05d1a5f47a3523b0aee25 as: v1-train: d5ae513875a8dbfd72060b8c64f652e7a165f3f4 v1.0.1: 8f72a06566265165fd76b4c630e7c0eab46045b8
Flags: needinfo?(jhford)
Verified as fixed in build: Kernel Date: Dec 5 Gecko: http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/ccec751a468e Gaia: ee0bef61c0a25c806dd1eec5a4e047bc418a5f73
Status: RESOLVED → VERIFIED
Verified fixed in build: Kernel Date: Dec 5 Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/68c8a883cfc0 Gaia: 1c38c91bb16f2bf0d5066c4787d2249463f61bb3
Whiteboard: QARegressExclude
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: