nsHttpResponseHead: Some functions can be made private...
Categories
(Core :: Networking: HTTP, defect, P5)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox95 | --- | fixed |
People
(Reporter: alfredkayser, Assigned: sd2187)
Details
(Keywords: good-first-bug, Whiteboard: [necko-would-take])
Attachments
(1 file)
Functions like ParseDateHeader GetDateValue, etc, are only used by nsHttpResponseHead.cpp itself, so these can be made private, which allows the compiler to further optimize these. http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/http/src/nsHttpResponseHead.h#125 125 // these return failure if the header does not exist. 126 nsresult ParseDateHeader(nsHttpAtom header, PRUint32 *result); 127 nsresult GetAgeValue(PRUint32 *result); 128 nsresult GetMaxAgeValue(PRUint32 *result); 129 nsresult GetDateValue(PRUint32 *result) { return ParseDateHeader(nsHttp::Date, result); } 130 nsresult GetExpiresValue(PRUint32 *result); 131 nsresult GetLastModifiedValue(PRUint32 *result) { return ParseDateHeader(nsHttp::Last_Modified, result); }
Comment 1•20 years ago
|
||
How does marking them private improve compiler optimization? Marking them NS_HIDDEN would certainly help.
| Reporter | ||
Comment 2•20 years ago
|
||
At least they will be hidden from misuse by others, and let's use NS_HIDDEN if that will help
Updated•18 years ago
|
| Reporter | ||
Comment 3•18 years ago
|
||
Note that GetDateValue and GetLastModifiedValues are both 'one liners' inline defined in the class definition, so if they are private the compiler can then really inline them if the compiler wants to do so. Also GetAgeValue and GetMaxAgeValue are relatively short functions, and only used in one location, so if they are private the compiler can inline them in the code if it helps optimization. So, by just defining these as 'private' will help the compiler to do its optimization job.
Updated•9 years ago
|
Comment 4•9 years ago
|
||
I'd like to take this one if possible.
Updated•9 years ago
|
Comment 5•7 years ago
|
||
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Updated•5 years ago
|
Comment 6•4 years ago
|
||
This good-first-bug hasn't had any activity for 6 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.
Hello,
I am Somdatta and I am an outreachy applicant.I wanted to know whether this bug has been resolved or not.If not,I would like to work on it.
Thanks
Comment 8•3 years ago
•
|
||
While some of the functions changed slightly, the general intent seems still valuable here, IMHO. Dragana, wdyt?
Updated•3 years ago
|
| Assignee | ||
Comment 10•3 years ago
|
||
Okay.I am working on it then.
One question,who should I submit a patch for review to?
Comment 11•3 years ago
|
||
Please follow this guide on how to submit a patch with moz-phab. As reviewer you can put r?#necko-reviewers into the commit message. Thanks!
| Assignee | ||
Comment 12•3 years ago
|
||
okay
| Assignee | ||
Comment 13•3 years ago
|
||
Make the following functions private because they are only used in nsHttpResponseHead.cpp for compiler optimization-
GetDateValue,GetAgeValue,GetMaxAgeValue,GetExpiresValue.
GetLastModifiedValue cannot be made private since it is being used in CachePushChecker.cpp and ParseDateHeader is already private.
Updated•3 years ago
|
Comment 14•3 years ago
|
||
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/a747b8d10c6b Make some functions private in nsHttpResponseHead r=necko-reviewers,kershaw
| Assignee | ||
Comment 15•3 years ago
|
||
Just wanted to confirm..the submitted patch has been landed right?
Comment 16•3 years ago
•
|
||
(In reply to Somdatta from comment #15)
Just wanted to confirm..the submitted patch has been landed right?
It is not yet in central. Now automated tests and other behind the scenes verification is running. You will see a second message here once it is there.
| Assignee | ||
Comment 17•3 years ago
|
||
okay
Comment 18•3 years ago
|
||
| bugherder | ||
Description
•