Last Comment Bug 748223 - Pack nsEditor better
: Pack nsEditor better
Status: RESOLVED FIXED
[MemShrink]
:
Product: Core
Classification: Components
Component: Editor (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla15
Assigned To: :Ehsan Akhgari (busy, don't ask for review please)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-23 21:44 PDT by :Ehsan Akhgari (busy, don't ask for review please)
Modified: 2012-04-24 18:11 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (v1) (7.13 KB, patch)
2012-04-23 21:55 PDT, :Ehsan Akhgari (busy, don't ask for review please)
roc: review+
Details | Diff | Review

Description :Ehsan Akhgari (busy, don't ask for review please) 2012-04-23 21:44:38 PDT
I have a patch which reduces sizeof(nsEditor) from 296 to 280 on 64-bit platforms.
Comment 1 :Ehsan Akhgari (busy, don't ask for review please) 2012-04-23 21:55:12 PDT
Created attachment 617780 [details] [diff] [review]
Patch (v1)

http://tbpl.mozilla.org/?tree=Try&rev=4f2154cdaebf
Comment 2 Nicholas Nethercote [:njn] 2012-04-23 22:51:05 PDT
How many nsEditor objects are we likely to have live at once?
Comment 3 Mozilla RelEng Bot 2012-04-24 01:45:24 PDT
Try run for 4f2154cdaebf is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=4f2154cdaebf
Results (out of 73 total builds):
    success: 56
    warnings: 7
    failure: 10
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/eakhgari@mozilla.com-4f2154cdaebf
Comment 4 :Ehsan Akhgari (busy, don't ask for review please) 2012-04-24 09:03:31 PDT
(In reply to Nicholas Nethercote [:njn] from comment #2)
> How many nsEditor objects are we likely to have live at once?

Currently, one per textarea element on the page, one per <input type=text> if you've interacted with them (by focusing/typing/etc) or if the page script does some special things (because the nsEditor for those are initialized lazily), one per any text box in XUL documents, and one per HTML document which has an editable section.
Comment 5 :Ehsan Akhgari (busy, don't ask for review please) 2012-04-24 09:05:13 PDT
https://hg.mozilla.org/projects/birch/rev/3e6ca2158274
Comment 6 :Ehsan Akhgari (busy, don't ask for review please) 2012-04-24 09:21:03 PDT
And backed out, since we treat warnings as errors!
Comment 7 :Ehsan Akhgari (busy, don't ask for review please) 2012-04-24 10:13:02 PDT
Relanded: https://hg.mozilla.org/projects/birch/rev/e1f732215854
Comment 8 :Ehsan Akhgari (busy, don't ask for review please) 2012-04-24 18:11:08 PDT
https://hg.mozilla.org/mozilla-central/rev/e1f732215854

Note You need to log in before you can comment on or make changes to this bug.