New tab page instances use more memory than new browser.xhtml instances and they shouldn't
Categories
(Firefox :: New Tab Page, enhancement, P2)
Tracking
()
Performance Impact | low |
People
(Reporter: Gijs, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: memory-footprint, perf:frontend, perf:resource-use, Whiteboard: [Memshrink:P2])
From about:memory, on a local build on 64-bit windows:
│ ├───4.56 MB (06.40%) -- top(about:home, id=2147483670)
│ │ ├──3.01 MB (04.23%) -- active/window(about:home)
│ │ │ ├──1.74 MB (02.45%) -- js-realm(about:home)
│ │ │ │ ├──1.12 MB (01.58%) -- classes
│ │ │ │ │ ├──0.57 MB (00.80%) -- class(Function)/objects
│ │ │ │ │ │ ├──0.55 MB (00.77%) ── gc-heap
│ │ │ │ │ │ └──0.02 MB (00.02%) ── malloc-heap/slots
│ │ │ │ │ ├──0.39 MB (00.54%) -- class(Object)/objects
│ │ │ │ │ │ ├──0.28 MB (00.40%) ── gc-heap
│ │ │ │ │ │ └──0.10 MB (00.15%) -- malloc-heap
│ │ │ │ │ │ ├──0.10 MB (00.14%) ── slots
│ │ │ │ │ │ └──0.00 MB (00.00%) ── elements/normal
│ │ │ │ │ ├──0.05 MB (00.08%) -- class(<non-notable classes>)/objects
│ │ │ │ │ │ ├──0.03 MB (00.05%) ── gc-heap
│ │ │ │ │ │ └──0.02 MB (00.03%) -- malloc-heap
│ │ │ │ │ │ ├──0.02 MB (00.03%) ── slots
│ │ │ │ │ │ └──0.00 MB (00.00%) ── misc
│ │ │ │ │ ├──0.05 MB (00.06%) -- class(Call)/objects
│ │ │ │ │ │ ├──0.04 MB (00.06%) ── gc-heap
│ │ │ │ │ │ └──0.01 MB (00.01%) ── malloc-heap/slots
│ │ │ │ │ ├──0.04 MB (00.06%) -- class(Array)/objects
│ │ │ │ │ │ ├──0.04 MB (00.05%) ── gc-heap
│ │ │ │ │ │ └──0.00 MB (00.00%) -- malloc-heap
│ │ │ │ │ │ ├──0.00 MB (00.00%) ── elements/normal
│ │ │ │ │ │ └──0.00 MB (00.00%) ── slots
│ │ │ │ │ └──0.03 MB (00.04%) -- class(ArrayBuffer)/objects
│ │ │ │ │ ├──0.03 MB (00.04%) ── malloc-heap/elements/normal
│ │ │ │ │ └──0.00 MB (00.00%) ── gc-heap
│ │ │ │ └──0.62 MB (00.87%) -- (5 tiny)
│ │ │ │ ├──0.40 MB (00.56%) -- scripts
│ │ │ │ │ ├──0.29 MB (00.40%) ── gc-heap
│ │ │ │ │ └──0.11 MB (00.16%) ── malloc-heap/data
│ │ │ │ ├──0.12 MB (00.17%) -- type-inference
│ │ │ │ │ ├──0.09 MB (00.12%) ── object-type-tables
│ │ │ │ │ └──0.04 MB (00.05%) ── allocation-site-tables
│ │ │ │ ├──0.09 MB (00.12%) ── script-counts-map
│ │ │ │ ├──0.01 MB (00.01%) ── realm-tables
│ │ │ │ └──0.01 MB (00.01%) ── sundries/malloc-heap
│ │ │ ├──1.17 MB (01.65%) -- layout
│ │ │ │ ├──0.54 MB (00.76%) ── style-sheets
│ │ │ │ ├──0.25 MB (00.35%) ++ style-structs
│ │ │ │ ├──0.19 MB (00.26%) ++ style-sets
│ │ │ │ ├──0.07 MB (00.10%) ++ computed-values
│ │ │ │ ├──0.06 MB (00.09%) ++ frames
│ │ │ │ ├──0.02 MB (00.02%) ── pres-shell
│ │ │ │ ├──0.01 MB (00.02%) ── line-boxes
│ │ │ │ ├──0.01 MB (00.02%) ── frame-properties
│ │ │ │ ├──0.01 MB (00.01%) ── text-runs
│ │ │ │ ├──0.01 MB (00.01%) ── element-data-objects
│ │ │ │ └──0.00 MB (00.00%) ── pres-contexts
│ │ │ └──0.10 MB (00.14%) -- (3 tiny)
│ │ │ ├──0.09 MB (00.13%) ++ dom
│ │ │ ├──0.00 MB (00.00%) ── property-tables
│ │ │ └──0.00 MB (00.00%) ── bindings
│ │ └──1.55 MB (02.17%) -- js-zone(0x1e00b969000)
│ │ ├──0.50 MB (00.70%) ── type-pool
│ │ ├──0.49 MB (00.69%) ++ shapes
│ │ ├──0.21 MB (00.29%) ++ scopes
│ │ ├──0.18 MB (00.25%) ++ object-groups
│ │ ├──0.08 MB (00.11%) ── unused-gc-things
│ │ ├──0.03 MB (00.05%) ── gc-heap-arena-admin
│ │ ├──0.03 MB (00.04%) ++ strings/string(<non-notable strings>)
│ │ ├──0.02 MB (00.03%) ── shape-tables
│ │ ├──0.01 MB (00.02%) ── unique-id-map
│ │ └──0.01 MB (00.01%) ++ sundries
│ ├───4.44 MB (02.02%) -- top(chrome://browser/content/browser.xul, id=16)/active
│ │ ├──4.20 MB (01.91%) -- window(chrome://browser/content/browser.xul)
│ │ │ ├──1.53 MB (00.70%) -- js-realm([System Principal], about:blank)
│ │ │ │ ├──0.88 MB (00.40%) -- classes
│ │ │ │ │ ├──0.69 MB (00.32%) -- class(Function)/objects
│ │ │ │ │ │ ├──0.68 MB (00.31%) ── gc-heap
│ │ │ │ │ │ └──0.01 MB (00.01%) ── malloc-heap/slots
│ │ │ │ │ ├──0.07 MB (00.03%) -- class(<non-notable classes>)/objects
│ │ │ │ │ │ ├──0.04 MB (00.02%) ── gc-heap
│ │ │ │ │ │ └──0.02 MB (00.01%) -- malloc-heap
│ │ │ │ │ │ ├──0.02 MB (00.01%) ── slots
│ │ │ │ │ │ ├──0.00 MB (00.00%) ── elements/normal
│ │ │ │ │ │ └──0.00 MB (00.00%) ── misc
│ │ │ │ │ ├──0.06 MB (00.03%) -- class(Object)/objects
│ │ │ │ │ │ ├──0.04 MB (00.02%) ── gc-heap
│ │ │ │ │ │ └──0.02 MB (00.01%) ── malloc-heap/slots
│ │ │ │ │ ├──0.04 MB (00.02%) ── class(SavedFrame)/objects/gc-heap
│ │ │ │ │ └──0.02 MB (00.01%) ── class(With)/objects/gc-heap
│ │ │ │ ├──0.56 MB (00.25%) -- scripts
│ │ │ │ │ ├──0.40 MB (00.18%) ── gc-heap
│ │ │ │ │ └──0.15 MB (00.07%) ── malloc-heap/data
│ │ │ │ ├──0.04 MB (00.02%) ── type-inference/object-type-tables
│ │ │ │ ├──0.03 MB (00.01%) ── script-counts-map
│ │ │ │ ├──0.01 MB (00.01%) ── saved-stacks-set
│ │ │ │ ├──0.01 MB (00.00%) ── realm-tables
│ │ │ │ └──0.01 MB (00.00%) ── sundries/malloc-heap
│ │ │ ├──1.37 MB (00.62%) -- dom
│ │ │ │ ├──1.15 MB (00.53%) ── element-nodes
│ │ │ │ ├──0.16 MB (00.07%) ── other
│ │ │ │ ├──0.03 MB (00.01%) ── orphan-nodes
│ │ │ │ ├──0.02 MB (00.01%) ── text-nodes
│ │ │ │ ├──0.00 MB (00.00%) ── comment-nodes
│ │ │ │ └──0.00 MB (00.00%) ── media-query-lists
│ │ │ ├──1.29 MB (00.59%) -- layout
│ │ │ │ ├──0.60 MB (00.27%) ++ style-sets
│ │ │ │ ├──0.50 MB (00.23%) ++ style-structs
│ │ │ │ ├──0.10 MB (00.05%) ++ computed-values
│ │ │ │ ├──0.05 MB (00.02%) ++ frames
│ │ │ │ ├──0.02 MB (00.01%) ── pres-shell
│ │ │ │ ├──0.01 MB (00.01%) ── element-data-objects
│ │ │ │ ├──0.01 MB (00.00%) ── frame-properties
│ │ │ │ ├──0.00 MB (00.00%) ── style-sheets
│ │ │ │ ├──0.00 MB (00.00%) ── pres-contexts
│ │ │ │ ├──0.00 MB (00.00%) ── line-boxes
│ │ │ │ └──0.00 MB (00.00%) ── text-runs
│ │ │ ├──0.01 MB (00.00%) ── bindings
│ │ │ └──0.00 MB (00.00%) ── property-tables
I'd expect it to be a fraction of the cost. The main issues seem to be this big js-zone thing (every new tab instance gets one, browser.xul doesn't, unsure what's going on there and why it doesn't get counted under about:newtab itself) and the pile (~400kb worth) of class(Object) instances that about:newtab creates and browser.xul, well, doesn't.
To be clear, this doesn't mean that the only goal is to get things smaller than browser.xul - browser's DOM weighs in at nearly 1.5mb, and by comparison about:newtab's is tiny (which makes sense and is how it should be). The confusing thing is that these are even in the same ballpark.
Comment 1•5 years ago
|
||
I believe this falls under Activity Stream? Not sure why the New Tab Page component still exists, or why the AS one isn't merged into this, which would be good for people filing bugs.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•4 years ago
|
Updated•2 years ago
|
Updated•1 month ago
|
Description
•