Closed
Bug 97176
Opened 23 years ago
Closed 23 years ago
startup perf- remove the need of loading of fontEncoding.properties files at startup time to speed up
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.9.6
People
(Reporter: ftang, Assigned: ftang)
References
Details
(Keywords: perf)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
rbs
:
review+
waterson
:
superreview+
|
Details | Diff | Splinter Review |
we currently load fontEncoding.properties at startup time, we should find a way
to
remove the need of loading it at startup time to speed up startup performance
we could
1. build in common used pair in the cpp code, and/or
2. cache the resolved result in registry.
Comment 1•23 years ago
|
||
per offline discussion with ftang - tentatively reassigning to myself
Assignee: ftang → jbetak
Assignee | ||
Comment 2•23 years ago
|
||
I refer to the code in gfx/src/windows/nsFontMetricsWin.cpp .Window specific
code
Assignee | ||
Comment 3•23 years ago
|
||
reassign to ftang
Assignee: jbetak → ftang
Target Milestone: --- → mozilla0.9.6
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•23 years ago
|
||
Assignee | ||
Comment 5•23 years ago
|
||
jbetak, can you r= this patch ?
Comment 6•23 years ago
|
||
r=jbetak
the only part I didn't understand was why FreeGlobals() had to be removed. Also
should we get rbs' sign-off on this? I believe this is his creation...
Updated•23 years ago
|
Attachment #52141 -
Flags: review+
Assignee | ||
Comment 7•23 years ago
|
||
rbs- can you r= this one too ?
>the only part I didn't understand was why FreeGlobals() had to be removed.
The code which load the property file used part of the InitGlobals(void) code.
And if we failed, we call FreeGlobal(). Now the code is move to be lazy loaded
into the system and in the mid of font enumeration. If we call FreeGlobal() in
the mid of it, I am not sure what will happen. We may release some code which
already reference to some existing object. So I think we should not FreeGlobal
if we failed.
Looks OK. r=rbs with the following nits.
1) NS_ERROR_ABORT is intimidating and suggests gpf or something...
what about s/NS_ERROR_ABORT/NS_ERROR_NOT_AVAILABLE/g
(i.e., "special encoder is not yet available").
2)
+ return rv;
+} <--- need blank line after this
+static nsresult
+InitGlobals(void)
+{
3)
And per local custom:
+ if( -> "if (" everywhere
4)
Plus, no need for the return after else:
+ if(gFontEncodingProperties)
+ return gFontEncodingProperties->GetStringProperty(name, aValue);
+ else
+ return NS_ERROR_ABORT;
Comment 10•23 years ago
|
||
Looks good, but could I see a new patch that addresses rbs's comments? Thanks!
Assignee | ||
Updated•23 years ago
|
Attachment #52141 -
Attachment is obsolete: true
Assignee | ||
Comment 11•23 years ago
|
||
Assignee | ||
Comment 12•23 years ago
|
||
rbs, I address your comment in the v2 of the patch. can you r= it . waterson,
can you sr= it ?
Comment 13•23 years ago
|
||
Comment on attachment 52826 [details] [diff] [review]
v2 of patch address rbs's review comment
r=rbs
Attachment #52826 -
Flags: review+
Assignee | ||
Updated•23 years ago
|
Comment 14•23 years ago
|
||
Comment on attachment 52826 [details] [diff] [review]
v2 of patch address rbs's review comment
sr=waterson
Attachment #52826 -
Flags: superreview+
Assignee | ||
Updated•23 years ago
|
Assignee | ||
Comment 15•23 years ago
|
||
fixed and check in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•