mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 14:15:30 +00:00
711c087f8e
mozilla/js/rhino/org is now distributed between mozilla/js/rhino/src and mozilla/js/rhino/toolsrc. The build.xml has been split in three. Docs now live in the project directory. These changes mean that the cvs directories mirror the distribution and thus a distribution will build the same way as a cvs build.
49 lines
1.7 KiB
HTML
49 lines
1.7 KiB
HTML
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<meta name="Author" content="Norris Boyd">
|
|
<meta name="GENERATOR" content="Mozilla/4.51 [en] (WinNT; U) [Netscape]">
|
|
<title>Small Footprint</title>
|
|
</head>
|
|
<body bgcolor="#FFFFFF">
|
|
|
|
<center>
|
|
<h1>
|
|
Small Footprint</h1></center>
|
|
A few changes can be made to reduce the footprint of Rhino for embeddings
|
|
where space is at a premium. On a recent build, Rhino consumed 355,883
|
|
bytes of space for uncompressed class files. With various changes that
|
|
number can be reduced to 281,455 bytes.
|
|
<br>
|
|
<h3>
|
|
Tools</h3>
|
|
Most embeddings won't need any of the classes in <tt>org.mozilla.javascript.tools</tt>
|
|
or any of its subpackages.
|
|
<br>
|
|
<h3>
|
|
Regular Expressions</h3>
|
|
The package <tt>org.mozilla.javascript.regexp</tt> can be removed. Rhino
|
|
will continue to run, although it will not be able to execute any regular
|
|
expression matches. This change saves 37,792 bytes of class files.
|
|
<br>
|
|
<h3>
|
|
JavaAdapter</h3>
|
|
Implementing the JavaAdapter functionality requires the ability to generate
|
|
classes on the fly. Removing <tt>org.mozilla.javascript.JavaAdapter</tt> and all
|
|
the classes in package <tt>org.mozilla.classfile</tt> will disable this
|
|
functionality, but Rhino will otherwise run correctly. These changes save
|
|
36,636 bytes.
|
|
<br>
|
|
<h3>
|
|
Optimizer</h3>
|
|
It is possible to run Rhino with interpreter mode only, allowing you to remove
|
|
classes for classfile generation. Remove the classes in packages
|
|
<tt>org.mozilla.classfile</tt> and <tt>org.mozilla.javascript.optimizer</tt>.
|
|
<br>
|
|
<p>
|
|
<hr WIDTH="100%">
|
|
<br><a href="index.html">back to top</a>
|
|
</body>
|
|
</html>
|