Account Options

  1. Sign in
Google Groups Home
« Groups Home
Advantages of using jar archive in extension chrome folder?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sailfish  
View profile  
 More options Feb 12 2010, 6:30 pm
Newsgroups: mozilla.dev.extensions
From: Sailfish <REMOVECAPSsailf...@REMOVECAPSunforgettable.com>
Date: Fri, 12 Feb 2010 15:30:42 -0800
Local: Fri, Feb 12 2010 6:30 pm
Subject: Advantages of using jar archive in extension chrome folder?
What are the advantages/disadvantages of using a jar archive in an
extension's chrome/ directory over simply leaving the directory tree
unarchived? More specifically, are their security or performance issues
one needs to take into consideration?

PS: I am speaking mainly of extensions that are small in size say, less
than 60KB.

TIA

--
Sailfish - Netscape/Mozilla Champion
Netscape/Mozilla Tips: http://www.ufaq.org/ , http://ilias.ca/
Rare Mozilla Stuff: http://www.projectit.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
johnjbarton  
View profile  
 More options Feb 12 2010, 6:36 pm
Newsgroups: mozilla.dev.extensions
From: johnjbarton <johnjbar...@johnjbarton.com>
Date: Fri, 12 Feb 2010 15:36:18 -0800
Local: Fri, Feb 12 2010 6:36 pm
Subject: Re: Advantages of using jar archive in extension chrome folder?
On 2/12/2010 3:30 PM, Sailfish wrote:

> What are the advantages/disadvantages of using a jar archive in an
> extension's chrome/ directory over simply leaving the directory tree
> unarchived? More specifically, are their security or performance issues
> one needs to take into consideration?

For an extension developer, the directory tree wins hands down. A small
performance advantage for reading out of the jar is hardly matched by
the confusing it adds to development.

For the average user with a few extensions it may make more of a difference.

jjb


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Malte Kraus  
View profile  
 More options Feb 12 2010, 7:05 pm
Newsgroups: mozilla.dev.extensions
From: Malte Kraus <fire...@maltekraus.de>
Date: Sat, 13 Feb 2010 01:05:50 +0100
Local: Fri, Feb 12 2010 7:05 pm
Subject: Re: Advantages of using jar archive in extension chrome folder?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

loading many small files from disk is significantly slower than loading
one big file - one of the things the Firefox developers were doing to
improve startup performance in Firefox 3.6 was moving more and more
files into jar files. For a small extension I don't think it's too much
of a problem, but there are people with 50 or more extensions, maybe it
helps them a little.

Having no jar makes packaging slightly easier, but there are scripts [1]
 taking care of that by creating a xpi with a jar file and automatically
translating a chrome.manifest used for developing (without a jar file).

1: This is what I am using:
http://code.google.com/p/organize-search-engines/source/browse/trunk/...

- --
Malte Kraus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkt17N4ACgkQU9AX8TCX8ctrhgCfbusUOKP9V/ZVZRiaH+JhWB1H
Kp0Ani7NvheOVFR8Oe7ejjbyBP1/SCh8
=aUZt
-----END PGP SIGNATURE-----


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Armando Stellato  
View profile  
 More options Feb 12 2010, 7:07 pm
Newsgroups: mozilla.dev.extensions
From: "Armando Stellato" <stell...@info.uniroma2.it>
Date: Sat, 13 Feb 2010 01:07:50 +0100
Local: Fri, Feb 12 2010 7:07 pm
Subject: RE: Advantages of using jar archive in extension chrome folder?
I too tend to leave the dir tree unarchived, though, if we want to find a
point in favor of jars, consider that if you have very long names (this
happened to me because I had java class files in the extension and the
package named burned out lot of the path space ) you may go over the 255
chars allowed for addressable file paths. This resulted in installation
errors which were not so easy to discover. Packaging all of those class
files in a jar eliminated the problem at the root...

Armando

> -----Original Message-----
> From: dev-extensions-bounces+stellato=info.uniroma2...@lists.mozilla.org

[mailto:dev-extensions-bounces+stellato=info.uniroma2...@lists.mozilla.org]
On


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sailfish  
View profile  
 More options Feb 12 2010, 9:19 pm
Newsgroups: mozilla.dev.extensions
From: Sailfish <REMOVECAPSsailf...@REMOVECAPSunforgettable.com>
Date: Fri, 12 Feb 2010 18:19:11 -0800
Local: Fri, Feb 12 2010 9:19 pm
Subject: Re: Advantages of using jar archive in extension chrome folder?
On 2/12/2010 3:30 PM, Sailfish wrote:
> What are the advantages/disadvantages of using a jar archive in an
> extension's chrome/ directory over simply leaving the directory tree
> unarchived? More specifically, are their security or performance issues
> one needs to take into consideration?

> PS: I am speaking mainly of extensions that are small in size say, less
> than 60KB.

All excellent responses, thanks for the information. I think I have a
better handle on when I might wish to use one or the other methods.

--
Sailfish - Netscape/Mozilla Champion
Netscape/Mozilla Tips: http://www.ufaq.org/ , http://ilias.ca/
Rare Mozilla Stuff: http://www.projectit.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Philip Chee  
View profile  
 More options Feb 12 2010, 11:18 pm
Newsgroups: mozilla.dev.extensions
From: Philip Chee <philip.c...@gmail.com>
Date: Sat, 13 Feb 2010 12:18:26 +0800
Local: Fri, Feb 12 2010 11:18 pm
Subject: Re: Advantages of using jar archive in extension chrome folder?

On Fri, 12 Feb 2010 15:30:42 -0800, Sailfish wrote:
> What are the advantages/disadvantages of using a jar archive in an
> extension's chrome/ directory over simply leaving the directory tree
> unarchived? More specifically, are their security or performance issues
> one needs to take into consideration?

> PS: I am speaking mainly of extensions that are small in size say, less
> than 60KB.

From a end user perspective. I have several different profiles, several
of Firefox, SeaMonkey, and of Thunderbird. Some of these profiles can
have up to 60 extensions installed. I back up my profiles twice a day to
different external hard disks and I notice that for unjarrred extensions
my incremental backup has to stat each file in each extension to
determine of it needs to be backed up, while for jarred extensiones it
only has to stat one jar file. The former causes a significant (it's all
cumulative) hit on my backup time.

From an extension developer perspective, I perfer jarred extensions. I
got into extensiond development by joining the Flashblock team and I
inherited some scripts that automated the jarring process so it's
basically all transparent to me.

From a SeaMonkey developer point of view I should point out that on
Mozilla trunk (Firefox 3.7a1) the platform developers are moving
aggressively towards jarring *everything* into one or at the most two
large jar files. It appears that on slower platforms such as Wince
opening handles to files is a slow and expensive process while mmaping
already opened jar files is significantly faster. Now consider someone
with 60+ unjarred extensions in his profile on an underpowered netbook
running some version of Windows and imagine that Firefox has to stat
every file in each extension on startup. The hit on the Ts performance
would be palpable.

The Fennec team is basically terribly unimpressed with how excruciating
slow Windows Mobile is in this and other regards and if you are writing
an extension for Firefox Mobile (Fennec) you should definitely jar your
extension. Your users will thank you. Fennec developers will thank you.
Plus you get lots of Karma points.

Phil

--
Philip Chee <phi...@aleytys.pc.my>, <philip.c...@gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
[ ]If all goes well, you've overlooked something!
* TagZilla 0.066.6


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sailfish  
View profile  
 More options Feb 13 2010, 2:54 am
Newsgroups: mozilla.dev.extensions
From: Sailfish <REMOVECAPSsailf...@REMOVECAPSunforgettable.com>
Date: Fri, 12 Feb 2010 23:54:55 -0800
Local: Sat, Feb 13 2010 2:54 am
Subject: Re: Advantages of using jar archive in extension chrome folder?
On 2/12/2010 8:18 PM, Philip Chee wrote:
>  From a end user perspective. I have several different profiles, several
> of Firefox, SeaMonkey, and of Thunderbird. Some of these profiles can
> have up to 60 extensions installed. I back up my profiles twice a day to
> different external hard disks and I notice that for unjarrred extensions
> my incremental backup has to stat each file in each extension to
> determine of it needs to be backed up, while for jarred extensiones it
> only has to stat one jar file. The former causes a significant (it's all
> cumulative) hit on my backup time.

I hadn't considered the backup implications for those who do it often
such as yourself. I'll keep that in mind if I ever develop any large
extension. btw, I do archive my chrome/ directory tree for my theme
packaging since themes contain a significant number of files. After
reading this, I'll ensure that I continue to do so with theme packaging.

>  From an extension developer perspective, I perfer jarred extensions. I
> got into extensiond development by joining the Flashblock team and I
> inherited some scripts that automated the jarring process so it's
> basically all transparent to me.

Most of my add-on activity evolves around themes but I do have a few
extensions that I keep maintained. My development environment is Windows
and I take advantage of the "Adding Extensions using the Windows
Registry" discussed here, http://tinyurl.com/ykekh2q. In that way I am
able to make and test changes live, without the need to package/install
the modified files.

>  From a SeaMonkey developer point of view I should point out that on
> Mozilla trunk (Firefox 3.7a1) the platform developers are moving
> aggressively towards jarring *everything* into one or at the most two
> large jar files. It appears that on slower platforms such as Wince
> opening handles to files is a slow and expensive process while mmaping
> already opened jar files is significantly faster. Now consider someone
> with 60+ unjarred extensions in his profile on an underpowered netbook
> running some version of Windows and imagine that Firefox has to stat
> every file in each extension on startup. The hit on the Ts performance
> would be palpable.

Hmm, that's very interesting. Does Mozilla open the jar file into
allocated memory and thereby removes the need to do a file stat? If so,
then wouldn't there be a performance trade-off between allocating a
significant amount of memory to cache the extensions chrome/ trees
versus the hit for doing file stat calls considering that most hard
drives have many megabytes of internal cache?

> The Fennec team is basically terribly unimpressed with how excruciating
> slow Windows Mobile is in this and other regards and if you are writing
> an extension for Firefox Mobile (Fennec) you should definitely jar your
> extension. Your users will thank you. Fennec developers will thank you.
> Plus you get lots of Karma points.

I'm not doing any work on stuff for Windows Mobile but thanks for the
heads-up in the event that I do find a need.

--
Sailfish - Netscape/Mozilla Champion
Netscape/Mozilla Tips: http://www.ufaq.org/ , http://ilias.ca/
Rare Mozilla Stuff: http://www.projectit.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil  
View profile  
 More options Feb 13 2010, 12:11 pm
Newsgroups: mozilla.dev.extensions
From: Neil <n...@parkwaycc.co.uk>
Date: Sat, 13 Feb 2010 17:11:39 +0000
Local: Sat, Feb 13 2010 12:11 pm
Subject: Re: Advantages of using jar archive in extension chrome folder?

Philip Chee wrote:
>I inherited some scripts that automated the jarring process so it's basically all transparent to me.

Well that does make things easier. I did this for XULMine (develop
unjarred, then create a jarred extension).

>Now consider someone with 60+ unjarred extensions in his profile on an underpowered netbook running some version of Windows and imagine that Firefox has to stat every file in each extension on startup. The hit on the Ts performance would be palpable.

This was actually to do with the XUL cache; Firefox would record every
chrome URL (up to the jar if present) and stat it on each restart to see
whether the XUL cache was out of date, even for files that never got
cached! It doesn't do that now (I'm not sure quite when it got turned
off), so if you edit your extension without clearing (sorry I forget
how) or disabling the cache the changes won't take effect even after a
restart.

--
Warning: May contain traces of nuts.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »