Long data: urls cause verbose view of about:memory to consume noticeable amount of memory

UNCONFIRMED
Unassigned

Status

()

UNCONFIRMED
7 years ago
a year ago

People

(Reporter: pleaseignorethistroll, Unassigned)

Tracking

Trunk
All
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

7 years ago
Long data: urls cause about:memory to consume noticeable amount of memory. For me, it happens when I use pdf.js (https://github.com/mozilla/pdf.js , http://mozilla.github.com/pdf.js/extensions/firefox/pdf.js.xpi) to view a PDF.
I wandered around pdf.js bug tracker and picked a PDF at random which allows to reproduce the issue.
Steps:
1. Install pdf.js
2. Open http://arxiv.org/pdf/1112.3148v1.pdf (no, I don't understand it)
3. Scroll all the way down slowly enough so that pages are rendered
4. Open about:memory?verbose
5. Refresh it so it would register its own memory usage.

about:memory?verbose (some stuff removed to keep length reasonable:
169,379,968 B (100.0%) -- explicit
├───67,569,192 B (39.89%) -- js
│   ├──30,636,950 B (18.09%) -- compartment(http://arxiv.org/pdf/1112.3148v1.pdf)
│   │  ├──16,359,424 B (09.66%) -- gc-heap
│   │  │  ├───9,282,864 B (05.48%) -- objects
│   │  │  │   ├──9,054,624 B (05.35%) ── non-function
│   │  │  │   └────228,240 B (00.13%) ── function
│   │  │  ├───3,185,728 B (01.88%) -- arena
│   │  │  │   ├──3,106,768 B (01.83%) ── unused
│   │  │  │   ├─────63,904 B (00.04%) ── headers
│   │  │  │   └─────15,056 B (00.01%) ── padding
│   │  │  ├───2,571,232 B (01.52%) ── strings
│   │  │  ├─────725,600 B (00.43%) -- shapes
│   │  │  │     ├──406,584 B (00.24%) ── dict
│   │  │  │     ├──216,264 B (00.13%) ── tree
│   │  │  │     └──102,752 B (00.06%) ── base
│   │  │  ├─────470,592 B (00.28%) ── type-objects
│   │  │  └─────123,408 B (00.07%) ── scripts
│   │  ├───5,268,064 B (03.11%) ── object-elements
│   │  ├───5,133,006 B (03.03%) ── string-chars
│   │  ├───1,540,576 B (00.91%) -- type-inference
│   │  │   ├────727,152 B (00.43%) ── object-main
│   │  │   ├────524,864 B (00.31%) ── tables
│   │  │   └────288,560 B (00.17%) ── script-main
│   │  ├───1,070,904 B (00.63%) ── script-data
│   │  ├─────428,160 B (00.25%) -- shapes-extra
│   │  │     ├──155,104 B (00.09%) ── dict-tables
│   │  │     ├──126,496 B (00.07%) ── tree-tables
│   │  │     ├──119,296 B (00.07%) ── compartment-tables
│   │  │     └───27,264 B (00.02%) ── tree-shape-kids
│   │  ├─────327,680 B (00.19%) ── mjit-code
│   │  ├─────317,504 B (00.19%) ── object-slots
│   │  ├─────187,456 B (00.11%) ── analysis-temporary
│   │  └───────4,176 B (00.00%) ── mjit-data
│   ├──23,942,890 B (14.14%) -- compartment([System Principal], 0x3775000)
│   │  ├──15,914,602 B (09.40%) ── string-chars
│   │  ├───4,583,424 B (02.71%) -- gc-heap
│   │  │   ├──1,419,840 B (00.84%) -- objects
│   │  │   │  ├────803,840 B (00.47%) ── function
│   │  │   │  └────616,000 B (00.36%) ── non-function
│   │  │   ├──1,204,688 B (00.71%) -- shapes
│   │  │   │  ├────748,560 B (00.44%) ── tree
│   │  │   │  ├────268,352 B (00.16%) ── base
│   │  │   │  └────187,776 B (00.11%) ── dict
│   │  │   ├────795,312 B (00.47%) ── scripts
│   │  │   ├────696,528 B (00.41%) -- arena
│   │  │   │    ├──663,000 B (00.39%) ── unused
│   │  │   │    ├───17,904 B (00.01%) ── headers
│   │  │   │    └───15,624 B (00.01%) ── padding
│   │  │   ├────431,456 B (00.25%) ── strings
│   │  │   ├─────35,392 B (00.02%) ── type-objects
│   │  │   └────────208 B (00.00%) ── xml
│   │  ├───1,339,488 B (00.79%) ── script-data
│   │  ├─────771,264 B (00.46%) -- shapes-extra
│   │  │     ├──354,112 B (00.21%) ── tree-tables
│   │  │     ├──245,760 B (00.15%) ── compartment-tables
│   │  │     ├───98,176 B (00.06%) ── tree-shape-kids
│   │  │     └───73,216 B (00.04%) ── dict-tables
│   │  ├─────524,288 B (00.31%) ── analysis-temporary
│   │  ├─────496,320 B (00.29%) ── object-slots
│   │  ├─────262,144 B (00.15%) ── mjit-code
│   │  ├──────23,952 B (00.01%) ── mjit-data
│   │  ├──────20,192 B (00.01%) -- type-inference
│   │  │      └──20,192 B (00.01%) ── script-main
│   │  └───────7,216 B (00.00%) ── object-elements
│   ├───5,677,056 B (03.35%) ── gc-heap-decommitted
│   ├───4,725,632 B (02.79%) -- compartment(atoms)
│   │   ├──4,021,120 B (02.37%) ── string-chars
│   │   └────704,512 B (00.42%) -- gc-heap
│   │        ├──693,104 B (00.41%) ── strings
│   │        └───11,408 B (00.01%) -- arena
│   │            ├───7,280 B (00.00%) ── unused
│   │            ├───2,752 B (00.00%) ── headers
│   │            └───1,376 B (00.00%) ── padding
│   ├───1,144,736 B (00.68%) -- runtime
│   │   ├────524,288 B (00.31%) ── atoms-table
│   │   ├────237,568 B (00.14%) ── runtime-object
│   │   ├────155,648 B (00.09%) ── temporary
│   │   ├────131,072 B (00.08%) ── stack-committed
│   │   ├─────65,536 B (00.04%) ── regexp-code
│   │   ├─────26,528 B (00.02%) ── contexts
│   │   └──────4,096 B (00.00%) ── normal
│   ├─────471,040 B (00.28%) ── gc-heap-chunk-dirty-unused
│   ├─────442,904 B (00.26%) ── xpconnect
│   ├─────442,368 B (00.26%) ── gc-heap-chunk-admin
│   ├──────51,976 B (00.03%) -- compartment([System Principal], file:///PATH TO PROFILE REMOVED/extensions/uriloader@pdf.js/bootstrap.js, 0x4306000)
│   │      ├──45,056 B (00.03%) -- gc-heap
│   │      │  ├──36,192 B (00.02%) -- arena
│   │      │  │  ├──35,856 B (00.02%) ── unused
│   │      │  │  ├─────176 B (00.00%) ── headers
│   │      │  │  └─────160 B (00.00%) ── padding
│   │      │  ├───4,416 B (00.00%) -- shapes
│   │      │  │   ├──2,496 B (00.00%) ── tree
│   │      │  │   ├──1,536 B (00.00%) ── base
│   │      │  │   └────384 B (00.00%) ── dict
│   │      │  ├───3,184 B (00.00%) -- objects
│   │      │  │   ├──2,048 B (00.00%) ── function
│   │      │  │   └──1,136 B (00.00%) ── non-function
│   │      │  ├─────864 B (00.00%) ── scripts
│   │      │  ├─────384 B (00.00%) ── type-objects
│   │      │  └──────16 B (00.00%) ── strings
│   │      ├───3,104 B (00.00%) -- shapes-extra
│   │      │   ├──2,304 B (00.00%) ── compartment-tables
│   │      │   ├────448 B (00.00%) ── tree-tables
│   │      │   ├────192 B (00.00%) ── tree-shape-kids
│   │      │   └────160 B (00.00%) ── dict-tables
│   │      ├───2,880 B (00.00%) ── object-slots
│   │      ├─────600 B (00.00%) ── script-data
│   │      ├─────320 B (00.00%) ── string-chars
│   │      └──────16 B (00.00%) -- type-inference
│   │             └──16 B (00.00%) ── script-main
│   ├──────31,336 B (00.02%) -- compartment(moz-nullprincipal:{5b660328-a749-4178-ae74-321082a52ec1})
│   │      ├──28,672 B (00.02%) -- gc-heap
│   │      │  ├──25,048 B (00.01%) -- arena
│   │      │  │  ├──24,792 B (00.01%) ── unused
│   │      │  │  ├─────144 B (00.00%) ── padding
│   │      │  │  └─────112 B (00.00%) ── headers
│   │      │  ├───1,848 B (00.00%) -- shapes
│   │      │  │   ├────984 B (00.00%) ── tree
│   │      │  │   ├────480 B (00.00%) ── base
│   │      │  │   └────384 B (00.00%) ── dict
│   │      │  ├───1,504 B (00.00%) -- objects
│   │      │  │   ├──1,248 B (00.00%) ── function
│   │      │  │   └────256 B (00.00%) ── non-function
│   │      │  ├─────144 B (00.00%) ── scripts
│   │      │  └─────128 B (00.00%) ── type-objects
│   │      ├───1,536 B (00.00%) ── object-slots
│   │      ├───1,120 B (00.00%) -- shapes-extra
│   │      │   ├────896 B (00.00%) ── compartment-tables
│   │      │   ├────160 B (00.00%) ── dict-tables
│   │      │   └─────64 B (00.00%) ── tree-shape-kids
│   │      └───────8 B (00.00%) ── script-data
│   ├───────2,304 B (00.00%) -- compartment(about:blank)
│   │       └──2,304 B (00.00%) -- shapes-extra
│   │          └──2,304 B (00.00%) ── compartment-tables
│   └───────────0 B (00.00%) ── gc-heap-chunk-clean-unused
├───49,934,600 B (29.48%) -- dom
│   └──49,934,600 B (29.48%) -- workers(arxiv.org)
│      └──49,934,600 B (29.48%) -- worker(blob:12e06a68-a97d-480c-9c71-924f3f850074, 0x9b0740009b07400)
│         ├──28,742,184 B (16.97%) -- compartment(Web Worker)
│         │  ├──14,453,280 B (08.53%) ── object-elements
│         │  ├──10,977,280 B (06.48%) -- gc-heap
│         │  │  ├───7,785,312 B (04.60%) -- objects
│         │  │  │   ├──7,733,600 B (04.57%) ── non-function
│         │  │  │   └─────51,712 B (00.03%) ── function
│         │  │  ├───2,239,112 B (01.32%) -- arena
│         │  │  │   ├──2,182,136 B (01.29%) ── unused
│         │  │  │   ├─────42,880 B (00.03%) ── headers
│         │  │  │   └─────14,096 B (00.01%) ── padding
│         │  │  ├─────458,944 B (00.27%) ── type-objects
│         │  │  ├─────325,544 B (00.19%) -- shapes
│         │  │  │     ├──183,384 B (00.11%) ── dict
│         │  │  │     ├──129,648 B (00.08%) ── tree
│         │  │  │     └───12,512 B (00.01%) ── base
│         │  │  ├─────108,432 B (00.06%) ── scripts
│         │  │  └──────59,936 B (00.04%) ── strings
│         │  ├───1,478,128 B (00.87%) -- type-inference
│         │  │   ├────724,416 B (00.43%) ── object-main
│         │  │   ├────524,320 B (00.31%) ── tables
│         │  │   └────229,392 B (00.14%) ── script-main
│         │  ├───1,041,736 B (00.62%) ── script-data
│         │  ├─────327,680 B (00.19%) ── mjit-code
│         │  ├─────191,024 B (00.11%) ── analysis-temporary
│         │  ├─────159,360 B (00.09%) ── object-slots
│         │  ├─────111,200 B (00.07%) -- shapes-extra
│         │  │     ├───56,608 B (00.03%) ── dict-tables
│         │  │     ├───28,480 B (00.02%) ── tree-tables
│         │  │     ├───17,280 B (00.01%) ── tree-shape-kids
│         │  │     └────8,832 B (00.01%) ── compartment-tables
│         │  └───────2,496 B (00.00%) ── string-chars
│         ├──19,709,952 B (11.64%) ── gc-heap-decommitted
│         ├─────570,432 B (00.34%) -- runtime
│         │     ├──237,568 B (00.14%) ── runtime-object
│         │     ├──131,072 B (00.08%) ── atoms-table
│         │     ├──131,072 B (00.08%) ── stack-committed
│         │     ├───65,536 B (00.04%) ── regexp-code
│         │     ├────4,096 B (00.00%) ── normal
│         │     ├────1,088 B (00.00%) ── contexts
│         │     └────────0 B (00.00%) ── temporary
│         ├─────491,520 B (00.29%) ── gc-heap-chunk-admin
│         ├─────420,512 B (00.25%) -- compartment(atoms)
│         │     ├──278,528 B (00.16%) -- gc-heap
│         │     │  ├──272,224 B (00.16%) ── strings
│         │     │  └────6,304 B (00.00%) -- arena
│         │     │       ├──4,640 B (00.00%) ── unused
│         │     │       ├──1,088 B (00.00%) ── headers
│         │     │       └────576 B (00.00%) ── padding
│         │     └──141,984 B (00.08%) ── string-chars
│         ├───────────0 B (00.00%) ── gc-heap-chunk-dirty-unused
│         └───────────0 B (00.00%) ── gc-heap-chunk-clean-unused
├───34,695,215 B (20.48%) ── heap-unclassified
├────5,612,544 B (03.31%) -- layout
│    ├──2,092,816 B (01.24%) -- shell(about:memory?verbose)
│    │  ├──1,345,840 B (00.79%) ── textruns [2]
│    │  ├────625,152 B (00.37%) ── arenas [2]
│    │  └────121,824 B (00.07%) ── styledata [2]
│    ├────974,176 B (00.58%) -- shell(http://arxiv.org/pdf/1112.3148v1.pdf)
│    │    ├──825,088 B (00.49%) ── arenas
│    │    ├───86,896 B (00.05%) ── textruns
│    │    └───62,192 B (00.04%) ── styledata
│    ├────565,200 B (00.33%) -- shell(chrome://browser/content/browser.xul)
│    │    ├──375,552 B (00.22%) ── arenas
│    │    ├──189,344 B (00.11%) ── styledata
│    │    └──────304 B (00.00%) ── textruns
│    ├────223,568 B (00.13%) ── style-sheet-cache
│    ├────105,248 B (00.06%) -- shell(data:text/html,REMOVED)
│    │    ├───58,304 B (00.03%) ── styledata
│    │    ├───46,848 B (00.03%) ── arenas
│    │    └───────96 B (00.00%) ── textruns
│    ├────105,168 B (00.06%) -- shell(data:text/html,REMOVED)
│    │    ├───58,320 B (00.03%) ── styledata
│    │    └───46,848 B (00.03%) ── arenas
│    ├────103,152 B (00.06%) -- shell(data:text/html,REMOVED)
│    │    ├───58,352 B (00.03%) ── styledata
│    │    └───44,800 B (00.03%) ── arenas
│    ├────102,176 B (00.06%) -- shell(data:text/html,REMOVED)
│    │    ├───58,304 B (00.03%) ── styledata
│    │    ├───43,776 B (00.03%) ── arenas
│    │    └───────96 B (00.00%) ── textruns
│    ├────102,128 B (00.06%) -- shell(data:text/html,REMOVED)
│    │    ├───58,352 B (00.03%) ── styledata
│    │    └───43,776 B (00.03%) ── arenas
│    ├────102,128 B (00.06%) -- shell(data:text/html,REMOVED)
│    │    ├───58,352 B (00.03%) ── styledata
│    │    └───43,776 B (00.03%) ── arenas
│    ├────102,096 B (00.06%) -- shell(data:text/html,REMOVED)
│    │    ├───58,320 B (00.03%) ── styledata
│    │    └───43,776 B (00.03%) ── arenas
│    ├────102,080 B (00.06%) -- shell(data:text/html,REMOVED)
│    │    ├───58,304 B (00.03%) ── styledata
│    │    └───43,776 B (00.03%) ── arenas
│    ├────101,056 B (00.06%) -- shell(data:text/html,REMOVED)
│    │    ├───58,304 B (00.03%) ── styledata
│    │    └───42,752 B (00.03%) ── arenas
│    ├─────98,608 B (00.06%) -- shell(resource://pdf.js/web/images/bookmark.svg)
│    │     ├──52,160 B (00.03%) ── styledata
│    │     └──46,448 B (00.03%) ── arenas
│    ├─────98,608 B (00.06%) -- shell(resource://pdf.js/web/images/download.svg)
│    │     ├──52,160 B (00.03%) ── styledata
│    │     └──46,448 B (00.03%) ── arenas
│    ├─────91,440 B (00.05%) -- shell(resource://pdf.js/web/images/document-print.svg)
│    │     ├──52,160 B (00.03%) ── styledata
│    │     └──39,280 B (00.02%) ── arenas
│    ├─────88,464 B (00.05%) -- shell(resource://gre-resources/hiddenWindow.html)
│    │     ├──58,000 B (00.03%) ── styledata
│    │     └──30,464 B (00.02%) ── arenas
│    ├─────82,224 B (00.05%) -- shell(resource://pdf.js/web/images/zoom-in.svg)
│    │     ├──52,160 B (00.03%) ── styledata
│    │     └──30,064 B (00.02%) ── arenas
│    ├─────76,080 B (00.04%) -- shell(resource://pdf.js/web/images/go-up.svg)
│    │     ├──52,160 B (00.03%) ── styledata
│    │     └──23,920 B (00.01%) ── arenas
│    ├─────74,032 B (00.04%) -- shell(resource://pdf.js/web/images/zoom-out.svg)
│    │     ├──52,160 B (00.03%) ── styledata
│    │     └──21,872 B (00.01%) ── arenas
│    ├─────74,032 B (00.04%) -- shell(resource://pdf.js/web/images/go-down.svg)
│    │     ├──52,160 B (00.03%) ── styledata
│    │     └──21,872 B (00.01%) ── arenas
│    ├─────74,032 B (00.04%) -- shell(resource://pdf.js/web/images/nav-outline.svg)
│    │     ├──52,160 B (00.03%) ── styledata
│    │     └──21,872 B (00.01%) ── arenas
│    └─────74,032 B (00.04%) -- shell(resource://pdf.js/web/images/nav-thumbs.svg)
│          ├──52,160 B (00.03%) ── styledata
│          └──21,872 B (00.01%) ── arenas
├────5,141,120 B (03.04%) -- storage
│    ├──4,493,696 B (02.65%) -- sqlite
│    │  ├──2,121,964 B (01.25%) -- places.sqlite
│    │  │  ├──1,912,292 B (01.13%) ── cache-used [3]
│    │  │  ├────166,848 B (00.10%) ── stmt-used [3]
│    │  │  └─────42,824 B (00.03%) ── schema-used [3]
│    │  ├──1,160,920 B (00.69%) ── other
│    │  ├────325,556 B (00.19%) -- webappsstore.sqlite
│    │  │    ├──297,388 B (00.18%) ── cache-used
│    │  │    ├───24,208 B (00.01%) ── stmt-used
│    │  │    └────3,960 B (00.00%) ── schema-used
│    │  ├────250,156 B (00.15%) -- chromeappsstore.sqlite
│    │  │    ├──231,556 B (00.14%) ── cache-used
│    │  │    ├───14,640 B (00.01%) ── stmt-used
│    │  │    └────3,960 B (00.00%) ── schema-used
│    │  ├────170,744 B (00.10%) -- cookies.sqlite
│    │  │    ├──165,456 B (00.10%) ── cache-used
│    │  │    ├────3,408 B (00.00%) ── stmt-used
│    │  │    └────1,880 B (00.00%) ── schema-used
│    │  ├────145,020 B (00.09%) -- content-prefs.sqlite
│    │  │    ├──132,540 B (00.08%) ── cache-used
│    │  │    ├────9,984 B (00.01%) ── stmt-used
│    │  │    └────2,496 B (00.00%) ── schema-used
│    │  ├────109,024 B (00.06%) -- downloads.sqlite
│    │  │    ├───99,624 B (00.06%) ── cache-used
│    │  │    ├────7,568 B (00.00%) ── stmt-used
│    │  │    └────1,832 B (00.00%) ── schema-used
│    │  ├────107,448 B (00.06%) -- permissions.sqlite
│    │  │    ├───99,624 B (00.06%) ── cache-used
│    │  │    ├────6,528 B (00.00%) ── stmt-used
│    │  │    └────1,296 B (00.00%) ── schema-used
│    │  └────102,864 B (00.06%) -- search.sqlite
│    │       ├───99,624 B (00.06%) ── cache-used
│    │       ├────2,000 B (00.00%) ── stmt-used
│    │       └────1,240 B (00.00%) ── schema-used
│    └────647,424 B (00.38%) -- prefixset
│         ├──331,824 B (00.20%) ── goog-phish-shavar
│         ├──315,440 B (00.19%) ── goog-malware-shavar
│         ├───────80 B (00.00%) ── test-malware-simple
│         └───────80 B (00.00%) ── test-phish-simple
├────3,708,771 B (02.19%) -- dom+style
│    └──3,708,771 B (02.19%) -- window-objects
│       └──3,708,771 B (02.19%) -- active
│          ├──3,212,747 B (01.90%) -- top=7 (inner=13)
│          │  ├──3,047,412 B (01.80%) -- inner-window(id=13, uri=http://arxiv.org/pdf/1112.3148v1.pdf)
│          │  │  ├──3,021,396 B (01.78%) ── dom
│          │  │  └─────26,016 B (00.02%) ── style-sheets
│          │  ├─────44,179 B (00.03%) -- inner-window(id=15, uri=data:text/html,REMOVED)
│          │  │     ├──43,635 B (00.03%) ── dom
│          │  │     └─────544 B (00.00%) ── style-sheets
│          │  ├─────40,243 B (00.02%) -- inner-window(id=17, uri=data:text/html,REMOVED)
│          │  │     ├──39,507 B (00.02%) ── dom
│          │  │     └─────736 B (00.00%) ── style-sheets
│          │  ├─────26,079 B (00.02%) -- inner-window(id=21, uri=data:text/html,REMOVED)
│          │  │     ├──25,439 B (00.02%) ── dom
│          │  │     └─────640 B (00.00%) ── style-sheets
│          │  ├─────24,103 B (00.01%) -- inner-window(id=19, uri=data:text/html,REMOVED)
│          │  │     ├──23,463 B (00.01%) ── dom
│          │  │     └─────640 B (00.00%) ── style-sheets
│          │  ├─────10,307 B (00.01%) -- inner-window(id=23, uri=data:text/html,REMOVED)
│          │  │     ├───9,859 B (00.01%) ── dom
│          │  │     └─────448 B (00.00%) ── style-sheets
│          │  ├──────5,435 B (00.00%) -- inner-window(id=25, uri=data:text/html,REMOVED)
│          │  │      ├──5,083 B (00.00%) ── dom
│          │  │      └────352 B (00.00%) ── style-sheets
│          │  ├──────5,051 B (00.00%) -- inner-window(id=29, uri=data:text/html,REMOVED)
│          │  │      ├──4,699 B (00.00%) ── dom
│          │  │      └────352 B (00.00%) ── style-sheets
│          │  ├──────4,831 B (00.00%) -- inner-window(id=31, uri=data:text/html,REMOVED)
│          │  │      ├──4,479 B (00.00%) ── dom
│          │  │      └────352 B (00.00%) ── style-sheets
│          │  ├──────4,707 B (00.00%) -- inner-window(id=27, uri=data:text/html,<!DOCTYPE%20HTML><html><head><style%20type="text/css">@font-face%20{%20font-family:'pdfFont19';src:url(data:font/opentype;base64,T1RUTwAJAIAAAwAQQ0ZGIFX/TlIAAACcAAABLk9TLzIBxypbAAABzAAAAGBjbWFw4BDgNQAAAiwAAAAuaGVhZKsmT+sAAAJcAAAANmhoZWECsQKwAAAClAAAACRobXR4AAAAAAAAArgAAAAIbWF4cAACUAAAAALAAAAABm5hbWUE/PSNAAACyAAAAgRwb3N0AAMAAQAABMwAAAAgAQAEAgABAQEHTVNBTTEwAAEBAST4GwH4HAL4HQOLi/ll+UMFiwwDiwwEq/egEvdaEfdXD/dUEAAEAQFvdXqAQ29weXJpZ2h0IChjKSAxOTk3LCAyMDA5IEFtZXJpY2FuIE1hdGhlbWF0aWNhbCBTb2NpZXR5ICg8aHR0cDovL3d3dy5hbXMub3JnPiksIHdpdGggUmVzZXJ2ZWQgRm9udCBOYW1lIE1TQU0xMC5NU0FNMTBFdWxlcnNxdWFyZQAAAAEDAAGKAAIBAQRB+IgO+Z2Ls/jzswHDs/jdswP5ZfkgFaqIj2se/OcGbIeIax/8/AdrjoesHvjlBqyOjqsf/QX4+BX43fzz/N0GDnWh+KWV9yGbBvtilwezCrMLHgoEN58MCaSaDAykmgwNAAAAAAADAiQB9AAFAAACigK7AAAAjAKKArsAAAHfADEBAgAAAAAGCQAAAAAAAAAAAAAQAAAAAAAAAAAAAAAqMjEqAADgAOAAAq8AAABkAq8AAAAAAAAAAAAAAAACrwAA4AAAAwAAAAEAAwABAAAADAAEACIAAAAEAAQAAQAA4AD//wAA4AD//wAAAAEABAAAAAEAAAABAAAAABAAAAAAAF8PPPUAAAPoAAAAAJ4LficAAAAAngt+JwAAAAAP/wKvAAAAEQAAAAAAAAAAAAEAAAKvAAAAAP//AAAAAAAAAq8AAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAFAAAAIAAAAAABQA9gABAAAAAAAAABAAAAABAAAAAAABAA0AEAABAAAAAAACAAcAHQABAAAAAAADAAgAJAABAAAAAAAEAA0ALAABAAAAAAAFAAwAOQABAAAAAAAGAAAARQABAAAAAAAHAAcARQABAAAAAAAIAAcATAABAAAAAAAJAAcAUwADAAEECQAAACAAWgADAAEECQABABoAegADAAEECQACAA4AlAADAAEECQADABAAogADAAEECQAEABoAsgADAAEECQAFABgAzAADAAEECQAGAAAA5AADAAEECQAHAA4A5AADAAEECQAIAA4A8gADAAEECQAJAA4BAE9yaWdpbmFsIGxpY2VuY2VPVExST0srTVNBTTEwVW5rbm93bnVuaXF1ZUlET1RMUk9LK01TQU0xMFZlcnNpb24gMC4xMVVua25vd25Vbmtub3duVW5rbm93bgBPAHIAaQBnAGkAbgBhAGwAIABsAGkAYwBlAG4AYwBlAE8AVABMAFIATwBLACsATQBTAEEATQAxADAAVQBuAGsAbgBvAHcAbgB1AG4AaQBxAHUAZQBJAEQATwBUAEwAUgBPAEsAKwBNAFMAQQBNADEAMABWAGUAcgBzAGkAbwBuACAAMAAuADEAMQBVAG4AawBuAG8AdwBuAFUAbgBrAG4AbwB3AG4AVQBuAGsAbgBvAHcAbgADAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAA);}</style><script%20type="application/javascript">%20%20var%20fontNames=["pdfFont19",%20];%20%20window.onload%20=%20function%20fontLoaderOnload()%20{%20%20%20%20parent.postMessage(JSON.stringify(fontNames),%20"*");%20%20}</script></head><body><p%20style="font-family:'pdfFont19'">Hi</p></body></html>)
│          │  │      ├──4,355 B (00.00%) ── dom
│          │  │      └────352 B (00.00%) ── style-sheets
│          │  └────────400 B (00.00%) -- inner-window(id=12, uri=[system])
│          │           └──400 B (00.00%) ── dom
│          ├────472,091 B (00.28%) -- top=1 (inner=2)
│          │    ├──469,069 B (00.28%) -- inner-window(id=2, uri=chrome://browser/content/browser.xul)
│          │    │  ├──330,336 B (00.20%) ── style-sheets
│          │    │  └──138,733 B (00.08%) ── dom
│          │    ├────1,511 B (00.00%) -- inner-window(id=10, uri=about:blank)
│          │    │    └──1,511 B (00.00%) ── dom
│          │    └────1,511 B (00.00%) -- inner-window(id=9, uri=about:blank)
│          │         └──1,511 B (00.00%) ── dom
│          ├─────16,175 B (00.01%) -- top=32 (inner=36)
│          │     ├──15,375 B (00.01%) -- inner-window(id=36, uri=about:memory?verbose)
│          │     │  ├───9,728 B (00.01%) ── style-sheets
│          │     │  └───5,647 B (00.00%) ── dom
│          │     ├─────400 B (00.00%) -- inner-window(id=34, uri=[system])
│          │     │     └──400 B (00.00%) ── dom
│          │     └─────400 B (00.00%) -- inner-window(id=35, uri=[system])
│          │           └──400 B (00.00%) ── dom
│          ├──────6,000 B (00.00%) -- outer-windows
│          │      └──6,000 B (00.00%) ── dom [15]
│          └──────1,758 B (00.00%) -- top=3 (inner=4)
│                 └──1,758 B (00.00%) -- inner-window(id=4, uri=resource://gre-resources/hiddenWindow.html)
│                    └──1,758 B (00.00%) ── dom
├──────955,424 B (00.56%) ── xpti-working-set
├──────863,536 B (00.51%) ── atom-table
├──────630,888 B (00.37%) -- startup-cache
│      ├──630,488 B (00.37%) ── mapping
│      └──────400 B (00.00%) ── data
├──────203,430 B (00.12%) -- images
│      ├──168,012 B (00.10%) -- chrome
│      │  ├──168,012 B (00.10%) -- used
│      │  │  ├──168,012 B (00.10%) ── uncompressed-nonheap
│      │  │  ├────────0 B (00.00%) ── raw
│      │  │  └────────0 B (00.00%) ── uncompressed-heap
│      │  └────────0 B (00.00%) -- unused
│      │           ├──0 B (00.00%) ── raw
│      │           ├──0 B (00.00%) ── uncompressed-heap
│      │           └──0 B (00.00%) ── uncompressed-nonheap
│      └───35,418 B (00.02%) -- content
│          ├──30,575 B (00.02%) -- used
│          │  ├──13,636 B (00.01%) ── uncompressed-nonheap
│          │  ├───8,475 B (00.01%) ── raw
│          │  └───8,464 B (00.00%) ── uncompressed-heap
│          └───4,843 B (00.00%) -- unused
│              ├──2,924 B (00.00%) ── uncompressed-nonheap
│              ├──1,919 B (00.00%) ── raw
│              └──────0 B (00.00%) ── uncompressed-heap
├───────55,360 B (00.03%) ── cycle-collector
├────────9,888 B (00.01%) ── history-links-hashtable
└────────────0 B (00.00%) ── spell-check

Other Measurements
143,573,376 B ── canvas-2d-pixel-bytes
  3,338,275 B ── dom-total-window
169,381,796 B ── explicit
          0 B ── gfx-d2d-surfacecache
          0 B ── gfx-d2d-surfacevram
      5,856 B ── gfx-surface-image
143,766,880 B ── gfx-surface-win32
107,485,356 B ── heap-allocated
117,846,016 B ── heap-committed
        8.78% ── heap-committed-fragmentation
  3,117,056 B ── heap-dirty
 85,451,666 B ── heap-unallocated
            3 ── js-compartments-system
            3 ── js-compartments-user
 28,311,552 B ── js-gc-heap
  3,837,696 B ── js-gc-heap-arena-unused
          0 B ── js-gc-heap-chunk-clean-unused
    471,040 B ── js-gc-heap-chunk-dirty-unused
  5,677,056 B ── js-gc-heap-decommitted
        0.37% ── js-gc-heap-unused-fraction
    711,744 B ── js-total-analysis-temporary
    617,952 B ── js-total-mjit
 16,800,912 B ── js-total-objects
  3,330,728 B ── js-total-scripts
  3,016,808 B ── js-total-shapes
 28,764,856 B ── js-total-strings
  2,067,280 B ── js-total-type-inference
            0 ── low-memory-events-physical
            0 ── low-memory-events-virtual
351,019,008 B ── private
374,038,528 B ── resident
  4,493,696 B ── storage-sqlite
    370,496 B ── style-sheets-total-window
528,203,776 B ── vsize
(Reporter)

Updated

7 years ago
Blocks: 722972
Thanks for filing!  Truncating longs URIs (e.g. at 1024 chars) is probably the best thing to do.  The truncation should be done in the memory reporters, not in about:memory.
I'd like to know what pdf.js is using data URLs for.  Data URLs are inefficient for more than just about:memory.  Unfortunately I don't know who actually works on pdf.js, so idk who to CC here.
> data:text/html,<!DOCTYPE%20HTML><html><head><style%20type="text/css">@font-face%20{%20font-
> family:'pdfFont19';src:url(data:font/opentype;base64

It looks to me like they're loading a font.

Please Ignore This Troll, is there just one data:URI?  By how much does about:memory's memory usage increase?  In general, about:memory?verbose uses a fair bit of memory.

Looking through pdf.js's commit log, I found Julian Viereck, cc'ed.
Oh, I see; there are all of these guys, too: shell(data:text/html,REMOVED), inner-window(id=15, uri=data:text/html,REMOVED).

Like Kyle, I'd like to see the whole thing, unless you're concerned about privacy or something.  You can post it as an attachment to this bug if you'd like.
(Reporter)

Comment 5

7 years ago
Created attachment 594686 [details]
about:memory output

This is unmodified output, except for profile path
Comment on attachment 594686 [details]
about:memory output

Thanks.  Looks like they're all fonts.  Kyle, do you have a suggestion for them?

The full output is 300kb, so I'm not so surprised that about:memory is eating up more memory than usual.  But I'd still like to know how much.
If font-face works with blob URIs, they should use that.  If it doesn't, we should fix it, and then they should use that ;-)
(Reporter)

Comment 8

7 years ago
(In reply to Justin Lebar [:jlebar] from comment #6)
> The full output is 300kb, so I'm not so surprised that about:memory is
> eating up more memory than usual.  But I'd still like to know how much.
As you can see, about:memory shows ~ 2 mb for shell(about:memory?verbose) except after clicking "Minimize memory usage",when it's about 600 kb. A refresh (F5 on keyboard) brings it back to 2mb. Maybe it causes bloat elsewhere, but I didn't do any other measurements. I think I'll attach about:memory?verbose after minimizing for your perusal.
(In reply to Justin Lebar [:jlebar] from comment #3)

> In general, about:memory?verbose uses
> a fair bit of memory.
That's OK, just it could use less.
(Reporter)

Comment 9

7 years ago
Created attachment 594732 [details]
about:memory?verbose output after clicking "Minimize memory usage"
> As you can see, about:memory shows ~ 2 mb for shell(about:memory?verbose) except after clicking 
> "Minimize memory usage",when it's about 600 kb. A refresh (F5 on keyboard) brings it back to 2mb. 

I see; I didn't even think to look at those numbers, because the shell is only a small fraction of the memory that about:memory uses.  The most important number is how "resident" bounces around.  See also the methodology in bug 722972 comment 0, which focuses on measuring JS memory usage, which is usually > 10x more than layout memory usage.

Anyway, we can certainly truncate the URLs, but I'm not sure if that's the right thing to do.
You need to log in before you can comment on or make changes to this bug.