further res protocol cleanup

RESOLVED FIXED in mozilla0.9.5

Status

()

P4
normal
RESOLVED FIXED
17 years ago
17 years ago

People

(Reporter: darin.moz, Assigned: darin.moz)

Tracking

Trunk
mozilla0.9.5
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-on-trunk)

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

17 years ago
the res protocol handler was IMO poorly designed.  it attempts to provide for
the possibility of multiple resource resolutions (or substitutions) and as a
result creates a very inefficient system.  i believe that this design is
completely overkill for a web browser.  the res protocol handler should have
only one substitution per key.  if that fails, it should be the callers
responsibility to try a different key.  i should add that no one is currently
using this "feature."

asserting that a resolution succeeds is very costly.  for example, the res
protocol handler has to verify access to the resolved file before accepting the
resolution.  this has a very negative effect on startup performance.

my patch for bug 97528 eliminates this check (b/c we only register one
substitution per key anyways).  and so, i believe that we should eliminate this
"feature."  the result will be a much simpler and faster res protocol handler.
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
Priority: -- → P4
Target Milestone: --- → mozilla0.9.5
(Assignee)

Comment 1

17 years ago
Created attachment 49713 [details] [diff] [review]
v1.0 patch
(Assignee)

Comment 2

17 years ago
this patch does a bunch of things:

1- cleans up nsIResProtocolHandler, removing extraneous unused API
2- cleans up nsResProtocolHandler
3- removed unused nsIResChannel (still need to remove references to
nsIResChannel in the rest of mozilla)
4- cleans up res protocol handler entry in nsNetModule.cpp
5- other miscellaneous cleanup
(Assignee)

Comment 3

17 years ago
in addition the mac project file will be modified to remove nsIResChannel.idl
(Assignee)

Comment 4

17 years ago
Created attachment 49834 [details] [diff] [review]
v1.1 removed reference to nsIResChannel in nsChromeProtocolHandler
(Assignee)

Updated

17 years ago
Attachment #49713 - Attachment is obsolete: true

Comment 5

17 years ago
Comment on attachment 49834 [details] [diff] [review]
v1.1 removed reference to nsIResChannel in nsChromeProtocolHandler

Looks good.  The nsIURI's that are in mSubstitutions does not be need to QI'ed since you are the only one putting anything in to that array.  Just static_cast.
Attachment #49834 - Flags: review+
(Assignee)

Comment 6

17 years ago
good point... i'll attach a new patch.
(Assignee)

Comment 7

17 years ago
Created attachment 49874 [details] [diff] [review]
v1.1 revised per comments from dougt
(Assignee)

Updated

17 years ago
Attachment #49834 - Attachment is obsolete: true
(Assignee)

Comment 8

17 years ago
Comment on attachment 49874 [details] [diff] [review]
v1.1 revised per comments from dougt

has r=dougt from previous comments
Attachment #49874 - Flags: review+

Comment 9

17 years ago
Comment on attachment 49874 [details] [diff] [review]
v1.1 revised per comments from dougt

sr=mscott
Attachment #49874 - Flags: superreview+
(Assignee)

Comment 10

17 years ago
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Whiteboard: fixed-on-trunk
You need to log in before you can comment on or make changes to this bug.