Closed
Bug 1120773
Opened 10 years ago
Closed 10 years ago
[FFOS2.0][Woodduck][PLMN] The compare of perso PLMN customization between Gecko and Gaia
Categories
(Firefox OS Graveyard :: Gaia::System, defect, P1)
Firefox OS Graveyard
Gaia::System
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sync-1, Unassigned, NeedInfo)
References
Details
(Whiteboard: [POVB])
my tel:13502294315
DEFECT DESCRIPTION:
the compare of perso PLMN customization between Gecko and Gaia,tcl perso customization have two revolutions,
1、perso customization at Gaia Layer,to read plmn-list.json size:135.7 kB.
and use XMLHttpRequest to read file,code as following:
var PLMN_FILE: '/shared/resources/plmn-list.json',
var PLMN_LIST: null,
mo_loadJSON(this.PLMN_FILE, function loadplmn(plmn) {
self.PLMN_LIST = plmn;
});
function mo_loadJSON(href, callback) {
if (!callback)
return;
var xhr = new XMLHttpRequest();
xhr.onerror = function() {
console.error('Failed to fetch file: ' + href, xhr.statusText);
};
xhr.onload = function() {
callback(xhr.response);
};
// For app that doesn't include the plmn-list.json file.
xhr.timeout = 1000;
xhr.ontimeout = function() {
console.error('Failed to fetch file: ontimeout');
};
xhr.open('GET', href, true); // async
xhr.responseType = 'json';
xhr.send();
}
2、perso at Gecko Layer at ril_worker.js,
now,I have some question,First,if perso customization at Gecko Layer,the performance of phone whether affect phone's performance low, second how to read plmn-list.json at ril_worker.js,thanks a lot.
Note: android perso customization at RIL.java
REPRODUCING PROCEDURES:
EXPECTED BEHAVIOUR:
ASSOCIATE SPECIFICATION:
TEST PLAN REFERENCE:
TOOLS AND PLATFORMS USED:
USER IMPACT:
REPRODUCING RATE:
For FT PR, Please list reference mobile's behavior:
Updated•10 years ago
|
Comment 1•10 years ago
|
||
Hi there:
It depends on you json content.
You can check [1] to import js file into ril_worker.js by modifying json to js file.
[1] - https://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/ril_worker.js#41
Flags: needinfo?(sku) → needinfo?(sync-1)
Updated•10 years ago
|
blocking-b2g: 2.0M? → ---
Whiteboard: [POVB]
Comment 2•10 years ago
|
||
moz.build also need to include your xxx.js
For example:
EXTRA_JS_MODULES += [
'ril_consts.js',
'ril_worker.js',
'RILSystemMessenger.jsm',
'xxx.js'
]
Dear shawn,
Thank you for your help,I have modify json file to js file, and the js file could put down the path "apls/gaia/shared/resources/plmn_list.js" ? and the size of js file is 135.7 kB, and I don't know the performance of phone whether affect phone's performance low compare with Gaia Layer.
Dear shawn,
I put the js file under the "alps/gecko/dom/system/gonk/plmn_list.js",and modify the apls/gecko/dom/system/gonk/moz.build file,
before:
EXTRA_JS_MODULES += [
'ril_consts.js',
'ril_worker.js',
]
after:
EXTRA_JS_MODULES += [
'ril_consts.js',
'ril_worker.js',
'plmn_list.js',
]
modify ril_worker.js add "importScripts("ril_consts.js");".
but compile error,"['UnsortedError: An attempt was made to add an unsorted sequence to a list. The incoming list is unsorted starting at element 0. We expected "plmn_list.js" but got "ril_consts.js"\n']"
Comment 6•10 years ago
|
||
Kai.du, what's the status of this bug? Can we close it now?
Flags: needinfo?(kai.du.hz)
(In reply to comment #6)
> Comment from Mozilla:Kai.du, what's the status of this bug? Can we close it
> now?
>
compile error,and can not read plmn_list.js file.
Updated•10 years ago
|
Flags: needinfo?(sku)
Comment 8•10 years ago
|
||
Please list the files according to alphabetical order.
// Wrong one
EXTRA_JS_MODULES += [
'ril_consts.js',
'ril_worker.js',
'plmn_list.js',
]
// Correct one
EXTRA_JS_MODULES += [
'plmn_list.js',
'ril_consts.js',
'ril_worker.js',
]
Flags: needinfo?(sku)
read plmn_list.js is ok, but the performance will reduce?
Flags: needinfo?(kai.du.hz)
Updated•10 years ago
|
Flags: needinfo?(sku)
Comment 10•10 years ago
|
||
(In reply to kai.du from comment #9)
> read plmn_list.js is ok, but the performance will reduce?
It depends on how you introduce plmn_list.js to ril_worker.js.
Since there are only few things (a large table for PLMNs mapping) to be manipulated and those code are resided in memory, I don't think it will cost too mush system time. And gecko work should be similar to gaia one, but just different location.
In short, there shouldn't be too much performance impact unless wrong implementation.
Flags: needinfo?(sku)
Reporter | ||
Comment 11•10 years ago
|
||
Dear dengwei,
this pr have fixed,please closed it,thanks,tcl pr:878646
Reporter | ||
Comment 12•10 years ago
|
||
Dear shawn,
there shouldn't be too much performance impact and be similar to gaia,It's OK.thank you for your help.
Comment 13•10 years ago
|
||
close per comment 11
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•