A (potential?) solution for SDK extensions...

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
JustOff

Re: A (potential?) solution for SDK extensions...

Unread post by JustOff » 2016-12-23, 14:18

GreenGeek wrote:Windows 8.1:
(Startup runner.js / Loader runner.js / bootstrap.js)
Thank you, at least one result for compare)
Off-topic:
Moonchild wrote:if you want to link to a bugzilla bug, all you need is the number and the [ bug ] [ /bug ] BBCode tags
Thanks, I always forget about it.

JustOff

Re: A (potential?) solution for SDK extensions...

Unread post by JustOff » 2016-12-23, 14:24

Since we are moving on PMkit way and the name package.json is banned by Addon Manager we need to choose the new one (to avoid the override hack).

At the moment I choose between application.json and manifest.json. The manifest.json most closely matches the essence of this file, but we already have chrome.manifest in the root folder and it (possible?) may lead to confusion. The application.json is unique, but not so good by the meaning of its name as manifest.json.

What do you think? Moonchild?

dark_moon

Re: A (potential?) solution for SDK extensions...

Unread post by dark_moon » 2016-12-23, 15:43

Here my results:
(Startup runner.js / Loader runner.js / bootstrap.js)

SDCorg 2082 / 806 / 508
SDCimp 746 / 275 / 283

RESorg 1255 / 606 / 394
RESimp 460 / 211 / 240

DCEorg 644 / 411 / 279
DCEimp 247 / 149 / 199

(Win7 x64)

GreenGeek

Re: A (potential?) solution for SDK extensions...

Unread post by GreenGeek » 2016-12-23, 16:31

kit.json (or pmkit.json) or extkit.json or addonsdk.json
maybe that at least gives you some more ideas

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35629
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: A (potential?) solution for SDK extensions...

Unread post by Moonchild » 2016-12-23, 16:53

How about simply calling it extension.json? :) A little ambiguous but better than application.json since it's not an application per se.
otherwise pmkit.json should be fine. It's unique for what we're doing.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

JustOff

Re: A (potential?) solution for SDK extensions...

Unread post by JustOff » 2016-12-23, 17:03

dark_moon wrote:Here my results:
Thanks! Btw, your PC is freaking fast)
GreenGeek wrote:kit.json (or pmkit.json) or extkit.json or addonsdk.json
maybe that at least gives you some more ideas
Thank you for the ideas, but imho this is wrong direction, because the name should refers to addon (extension/application) itself, not the SDK.
Moonchild wrote:How about simply calling it extension.json? :) A little ambiguous but better than application.json since it's not an application per se.
otherwise pmkit.json should be fine. It's unique for what we're doing.
I would prefer the extension.json among your variants, see my explanation above. As for the manifest.json, you think it's too confusing?

dark_moon

Re: A (potential?) solution for SDK extensions...

Unread post by dark_moon » 2016-12-23, 17:20

Off-topic:
JustOff wrote:
dark_moon wrote:Here my results:
Thanks! Btw, your PC is freaking fast)
Haha thanks, but my pc is very old:
GA-EP43-DS3L with Intel Core 2 Quad Q9550 @2.8Ghz, 4GB DDR2-800 memory, Nvidia GTX 660
I run the test on a old Samsung 830 SSD with 64GB (SATA II)

GreenGeek

Re: A (potential?) solution for SDK extensions...

Unread post by GreenGeek » 2016-12-23, 17:36

then something like:
properties.json
parameters.json
declaration(s).json

but the others are fine too

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35629
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: A (potential?) solution for SDK extensions...

Unread post by Moonchild » 2016-12-23, 22:55

JustOff wrote:As for the manifest.json, you think it's too confusing?
I don't think it is. That was something that was more your concern than mine -- whatever it is it has to be decided on and then made part of the documentation.

Let's say this:
If it's a manifest, then manifest.json would be my first choice. If that's considered too confusing, then it should be extension.json.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

HaleSun
Fanatic
Fanatic
Posts: 109
Joined: 2016-03-11, 11:39

Re: A (potential?) solution for SDK extensions...

Unread post by HaleSun » 2016-12-24, 04:50

Others posted their results in a strange order (I read my console top to bottom and left to right)
but for the sake of consistency I rearranged my results to match:

Code: Select all

Startup runner.js / Loader runner.js / bootstrap.js

SDCorg 1654ms / 650ms / 372ms
SDCimp  549ms / 207ms / 201ms

RESorg 986ms / 480ms / 280ms
RESimp 335ms / 157ms / 165ms

DCEorg 499ms / 322ms / 188ms
DCEimp 175ms / 105ms / 132ms

Fedor2

Re: A (potential?) solution for SDK extensions...

Unread post by Fedor2 » 2016-12-24, 15:26

Awesome perfomance rise!

Code: Select all

Startup runner.js / Loader runner.js / bootstrap.js

SDCorg 1880ms / 729ms / 415ms
SDCimp  668ms / 246ms / 215ms

RESorg 1132ms / 546ms / 313ms
RESimp 410ms / 188ms / 176ms

DCEorg 582ms / 370ms / 211ms
DCEimp 221ms /132ms / 141ms

kizo07

Re: A (potential?) solution for SDK extensions...

Unread post by kizo07 » 2016-12-24, 17:37

Here are results off No/Sr Win 10 x64 jury:

Code: Select all

Startup runner.js / Loader runner.js / bootstrap.js

SDCorg 2491ms / 816ms / 650ms
SDCimp  2113ms / 818ms / 647ms

RESorg 1650ms / 771ms / 539ms
RESimp 1270ms / 605ms / 507ms

DCEorg 869ms / 528ms / 427ms
DCEimp 659ms /414ms / 370ms

and with external sec of:

Startup runner.js / Loader runner.js / bootstrap.js

SDCorg 2029ms / 784ms / 523ms
SDCimp  718ms / 279ms / 318ms

RESorg 1225ms / 584ms / 405ms
RESimp 429ms / 198ms / 268ms

DCEorg 631ms / 412ms / 292ms
DCEimp 227ms / 136ms/ 221ms
and with Win firewall (3td part disabled) all values are between 100-300ms... Only 444ms RESimp and 708ms SDCimp as highest

And finally... Twelve Points/Douze Point going to... ...JustOff!

JustOff

Re: A (potential?) solution for SDK extensions...

Unread post by JustOff » 2016-12-24, 18:43

Thanks all for beta-testing, the corresponding patches will be proposed to upstream.
Moonchild wrote:If it's a manifest, then manifest.json would be my first choice. If that's considered too confusing, then it should be extension.json.
I just found that manifest.json is taken by WebExtensions, thus we have no choice but extension.json.

JustOff

Re: A (potential?) solution for SDK extensions...

Unread post by JustOff » 2016-12-25, 14:57

Next goal is bug #1309351. Here is portable Pale Moon 27.1.0b1 package with preinstalled Decentraleyes, RES and SDC, extra debug enabled and three versions of SDK included: original, with #1309350 and with both #1309350 + #1309351 backported.

In my environment #1309351 leads to even twice speedup of loading in comparison with only #1309350 and about six times to the original code... :coffee:

P.S. If you would like to share your result please hide it under cut.

dark_moon

Re: A (potential?) solution for SDK extensions...

Unread post by dark_moon » 2016-12-25, 16:10

Here are my results:
PalemoonOriginal
---------------

SDC: 2091ms Startup || 811ms Loader || 512ms Bootstrap
RES: 1257ms Startup || 607ms Loader || 398ms Bootstrap
DEC: 646ms Loader || 414ms Loader || 283ms Bootstrap


PalemoonImproved
----------------

SDC: 743ms Startup || 272ms Loader || 284ms Bootstrap
RES: 458ms Startup || 207ms Loader || 240ms Bootstrap
DEC: 250ms Startup || 150ms Loader || 200ms Bootstrap


PalemoonImproved2
-----------------

SDC: no Startup || no Loader || 203ms Bootstrap
RES: no Startup || no Loader || 184ms Bootstrap
DEC: no Startup || no Loader || 167ms Bootstrap

Errors i get in error console:

A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/J ... sm/Promise

Date: Sun Dec 25 2016 17:04:11 GMT+0100
Full Message: TypeError: setting a property that has only a getter
Full Stack: @resource://gre/modules/jetpack/method/core.js:147:14
@resource://gre/modules/jetpack/sdk/util/dispatcher.js:11:16
@resource://gre/modules/jetpack/sdk/window/utils.js:13:24
@resource://gre/modules/jetpack/sdk/addon/window.js:11:47
startup/<@resource://gre/modules/jetpack/sdk/addon/runner.js:73:19
Handler.prototype.process@resource://gre/modules/Promise-backend.js:867:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise-backend.js:746:7
this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise-backend.js:688:37

Source File: resource://gre/modules/jetpack/toolkit/loader.js -> resource://gre/modules/jetpack/method/core.js
Line: 147
Source Code:
147

A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/J ... sm/Promise

Date: Sun Dec 25 2016 17:04:11 GMT+0100
Full Message: TypeError: setting a property that has only a getter
Full Stack: @resource://gre/modules/jetpack/method/core.js:147:14
@resource://gre/modules/jetpack/sdk/util/dispatcher.js:11:16
@resource://gre/modules/jetpack/sdk/window/utils.js:13:24
@resource://gre/modules/jetpack/sdk/addon/window.js:11:47
startup/<@resource://gre/modules/jetpack/sdk/addon/runner.js:73:19
Handler.prototype.process@resource://gre/modules/Promise-backend.js:867:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise-backend.js:746:7
this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise-backend.js:688:37

Source File: resource://gre/modules/jetpack/toolkit/loader.js -> resource://gre/modules/jetpack/method/core.js
Line: 147
Source Code:
147

A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/J ... sm/Promise

Date: Sun Dec 25 2016 17:04:11 GMT+0100
Full Message: TypeError: setting a property that has only a getter
Full Stack: @resource://gre/modules/jetpack/method/core.js:147:14
@resource://gre/modules/jetpack/sdk/util/dispatcher.js:11:16
@resource://gre/modules/jetpack/sdk/window/utils.js:13:24
@resource://gre/modules/jetpack/sdk/addon/window.js:11:47
startup/<@resource://gre/modules/jetpack/sdk/addon/runner.js:73:19
Handler.prototype.process@resource://gre/modules/Promise-backend.js:867:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise-backend.js:746:7
this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise-backend.js:688:37

Source File: resource://gre/modules/jetpack/toolkit/loader.js -> resource://gre/modules/jetpack/method/core.js
Line: 147
Source Code:
147
mismatched tag. Expected: </hr>.
Source File: http://blocklist.palemoon.org/27.1.0b1/blocklist.xml
Line: 6, Column: 3
Source Code:
</body>

JustOff

Re: A (potential?) solution for SDK extensions...

Unread post by JustOff » 2016-12-25, 16:19

dark_moon wrote:Here are my results:
Could you please run PalemoonImproved2.cmd test once again? I saw the same error, but unfortunately only once and I can't reproduce it anymore. It seems that this error somehow caused by os/browser cache and renaming of file, but I'm not sure.

I found the problem, it was browser startup cache. I added del User\Palemoon\Profiles\Default\startupCache\startupCache.4.little to all cmd files and reuploaded PaleMoonSDKBench2.rar.
Last edited by JustOff on 2016-12-25, 17:21, edited 2 times in total.

kizo07

Re: A (potential?) solution for SDK extensions...

Unread post by kizo07 » 2016-12-25, 17:17

JustOff wrote:but I'm not sure
Ops, I forgot to mention that in previous testing, I got twice message 'Could not read chrome manifest ' (PaleMoonSDKBench/Bin/Palemoon/chrome.manifest and PaleMoonSDKBench/Bin/Palemoon/browser/extensions/%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D/chrome.manifest). I thought that since is in console, that is theme related and at add-on is 'not origin', and I ignored...or?

JustOff

Re: A (potential?) solution for SDK extensions...

Unread post by JustOff » 2016-12-25, 17:19

kizo07 wrote:Ops, I forgot to mention that in previous testing, I got twice message 'Could not read chrome manifest ' (PaleMoonSDKBench/Bin/Palemoon/chrome.manifest and PaleMoonSDKBench/Bin/Palemoon/browser/extensions/%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D/chrome.manifest).
It's ok for portable build. The error in PaleMoonSDKBench2.rar was related to browser startup cache and also fixed (see above).
Last edited by JustOff on 2016-12-25, 18:10, edited 1 time in total.

dark_moon

Re: A (potential?) solution for SDK extensions...

Unread post by dark_moon » 2016-12-25, 17:53

Did i need now to run PalemoonImproved2.cmd again, cause you fix the error?

JustOff

Re: A (potential?) solution for SDK extensions...

Unread post by JustOff » 2016-12-25, 18:04

dark_moon wrote:Did i need now to run PalemoonImproved2.cmd again, cause you fix the error?
Yes, please. But all three cmd files should be updated. You can simple re-download PaleMoonSDKBench2.rar or use code below:
PalemoonOriginal.cmd:

Code: Select all

@echo off
cd /d %~dp0
del User\Palemoon\Profiles\Default\startupCache\startupCache.4.little
copy /y Bin\palemoon\omni0.ja Bin\palemoon\omni.ja
start Palemoon-Portable.bin
PalemoonImproved.cmd:

Code: Select all

@echo off
cd /d %~dp0
del User\Palemoon\Profiles\Default\startupCache\startupCache.4.little
copy /y Bin\palemoon\omni1.ja Bin\palemoon\omni.ja
start Palemoon-Portable.bin
PalemoonImproved2.cmd:

Code: Select all

@echo off
cd /d %~dp0
del User\Palemoon\Profiles\Default\startupCache\startupCache.4.little
copy /y Bin\palemoon\omni2.ja Bin\palemoon\omni.ja
start Palemoon-Portable.bin

Locked