Closed Bug 98786 Opened 23 years ago Closed 23 years ago

320 url clones from css loader

Categories

(Core :: CSS Parsing and Computation, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.5

People

(Reporter: dp, Assigned: dp)

References

Details

(Whiteboard: Need r=,sr= [whitebox])

Attachments

(1 file)

CSS loader parser account for 320 url clones of 1200 url objects created on startup.

* 320 url clones from css Loader
  -  36 LoadSheet : 32 agentsheet, 4 Syncload
  - 279 nsCSSParser
  -   5 unaccounted
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9.5
Test case used in analysis is
./mozilla -P 'Default User' file:///use/tmp/quit.html
Blocks: 97528
Whiteboard: Need r=,sr=
Comment on attachment 48631 [details] [diff] [review]
Removes 279 url objects on startup with blank page

Looks ok to me. Just two small nitpick things here--

1. I am assuming you'd remove the printfs before checking in (or surround them by #ifdef DEBUG_dp)

2. In the constructor of URLKey you can now get rid of urlstr variable and directly do mURL->GetSpec(&mSpec) Saves a temporary variable allocation. 
Good stuff! r=gagan
Attachment #48631 - Flags: review+
- dp, please do wrap all:

+    printf("DEBUG-dp ...);

lines in #ifdef DEBUG_dp

- This looks a bit odd:

+    return ((nsCRT::strcasecmp(mSpec, key->mSpec) == 0) ? PR_TRUE : PR_FALSE);

why the "? PR_TRUE : PR_FALSE" ? (I know you didn't write it, but you could get
rid of it ;-)

- Do we need the code you #if 0'ed out or could you remove it from the code? If
it's not needed you might as well delete the code to clean things up...

Other than that, sr=jst
So guys, since I do optimize builds to work on performance, printf is my only
recourse and I cannot do DEBUG_dp. I will make *sure* I remove them before
checkin (next time before I attach the patch).

> +  return ((nsCRT::strcasecmp(mSpec, key->mSpec) == 0) ? PR_TRUE : PR_FALSE);
> 
> why the "? PR_TRUE : PR_FALSE" ? (I know you didn't write it, but you could 
> get rid of it ;-)

Done. Changed it to:

+    return nsCRT::strcasecmp(mSpec, key->mSpec) == 0;

> - Do we need the code you #if 0'ed out or could you remove it from the code?
> If it's not needed you might as well delete the code to clean things up...


Done.

Thanks jst. All review comments accepted and will make changes before checkin.
Gagan, thanks. Will do your (1) and (2) review suggestions too.
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: Need r=,sr= → Need r=,sr= [whitebox]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: