gecko-dev/netwerk
brendan%mozilla.org e81a02eeb2 Reduce seeks outside the FastLoad file's underlying stream buffer (195010,
r=ben, sr=bryner).

- Pass null scope objects into nsIScriptContext::Compile{EventHandler,Script}
when precompiling for brutal sharing.  The JS engine does not need a non-null
object parameter for static scope.  That parameter can be non-null only if it
helps the compiler "pre-bind" functions to the same scope object that they'll
be parented by when executing, but with brutal sharing, functions are
precompiled once and executed against many different scope objects.

- A problem in XUL FastLoad was that it would serialize master .xul document
out-of-line scripts (those included via script src= from non-overlay, "master"
.xul docs) far from the place in the FastLoad file where XUL prototype script
info was serialized for the <script src=> tag itself.  I fixed that so that,
unless the out-of-line script was previously serialized (by a different src=
reference from another .xul file), the OOL script data immediately follows the
proto-script info in the FastLoad file.

This required adding a SerializeOutOfLine method to nsXULPrototypeScript, which
restores symmetry by matching the existing DeserializeOutOfLine(Script) (note:
I dropped the redundant "Script" from the end of the latter method's name.  We
need SerializeOutOfLine to handle overlay OOL scripts.	They are serialized by
nsXULDocument::OnStreamComplete, because that code knows the difference between
an overlay and a master doc.  This removes all trace of FastLoad writing from
nsXULPrototypeScript::Compile -- FastLoad stuff didn't belong there, not only
because we now want to write master OOL scripts later, when walking the master
XUL prototype doc's element tree, but also for modularity reasons.  The caller
knows about FastLoad, nsXULPrototypeScript::Compile does just what its name
implies.

There are 132 seeks with the patch, only 49 of which dump the underlying file
stream's buffer, vs. 133 seeks without the patch, 87 of which dump the buffer.

- Nit-picked some comments to fit in 80 columns, and made other cosmetic fixes.

- Implicated the nsXULDocument::mIsWritingFastLoad flag from the useXULCache
"is the XUL cache enabled?" flag, so other places that test mIsWritingFastLoad
don't have to query whether the cache is enabled.

- Added METERING synchronous meter-dumping to /tmp/bufstats, only ifdef
DEBUG_brendan, in netwerk/base/src/nsBufferedStreams.cpp.

- Added the deferred seek optimization from the first patch in bug 195010 to
nsFastLoadFile.cpp.

- Fixed nsFastLoadFileReader so it overrides readSegments as well as read.
This catches up with the interface extension made to nsIInputStream to add
readSegments.  The nsFastLoadFileReader extends nsBinaryInputStream, which is
a concrete class, and overrides Read in order to snoop on *all* bytes read.
It does this in order to demultiplex documents interleaved when the FastLoad
file was written.

But since the readSegments move into nsIInputStream.idl, certain primitives
in nsBinaryStream.cpp, e.g., nsBinaryInputStream::ReadCString, have used
ReadSegments, not Read, to consume parts of the underlying stream (to read
the C string's chars, in that example), and the FastLoad file implementation
has not accounted for those bytes.

- Added a new method to nsIFastLoadFileControl and its impls: hasMuxedDocument.
 This is needed when serializing master XUL doc OOL scripts, because we must
not serialize twice, and any OOL script that other XUL docs can include via
script src= could already be in the FastLoad mux.

/be
2003-04-12 01:34:11 +00:00
..
base Reduce seeks outside the FastLoad file's underlying stream buffer (195010, 2003-04-12 01:34:11 +00:00
build fixes bug 80918 "Proxy: 'No Proxy for:' does not support ip address wildcards" r=bbaetz sr=alecf 2003-04-11 18:24:55 +00:00
build2 move keyword and data handlers over to necko2 to shrink the embedding build - bug 106206 2003-01-22 03:50:16 +00:00
cache fixes bug 201303 "Utilize new nsIAtom methods to reduce string conversions in nsCacheMetaData" r=gordon sr=alecf 2003-04-10 00:59:33 +00:00
cookie Start installing GRE libraries & components into a separate dist/gre directory as part of the default build. 2002-12-28 01:15:07 +00:00
dns Initialize IDN service at nsStandardURL constructor, 2003-04-11 17:05:56 +00:00
macbuild Fixing CFM bustage. Necko2, not Necko. 2003-01-22 11:06:15 +00:00
mime fix for bug #119964. implement yEnc decoding. 2003-04-10 02:19:35 +00:00
protocol fixes bug 201370 "TLS intolerance detection broken" r=kaie sr=alecf 2003-04-10 19:06:24 +00:00
resources fix for bug 48202 - HTTP 307 redirect behavior violates RFC2616 [should preserve request method]. r-dougt,sr-darin. 2003-03-25 01:19:21 +00:00
socket Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it is no longer needed. r=timeless sr=jag 2003-01-08 22:35:09 +00:00
streamconv Adding Ascii check for mailto url recognition, 2003-04-11 16:56:01 +00:00
test Bug 199200 Make Networking Tests XP friendly by using the eventqueueservice 2003-04-04 16:01:51 +00:00
testserver Renaming 'install' build phase to 'libs' 2001-11-21 08:55:59 +00:00
.cvsignore
gen-makefile.sh
Makefile.in modifications for bug 176919 "async streams" r=dougt,gordon sr=sspitzer a=valeski,asa 2003-01-18 02:15:14 +00:00