Open Bug 992125 Opened 6 years ago Updated 5 years ago

PDF increases heap-unclassified significantly

Categories

(Firefox :: PDF Viewer, defect, P3)

x86_64
Windows 7
defect

Tracking

()

People

(Reporter: JasnaPaka, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [MemShrink:P2][pdfjs-c-performance])

Attachments

(1 file)

Attached file Problematic PDF
How to reproduce:
1) Show http://www.jasnapaka.com/bugs/Rozrod.pdf in pdf.js.
2) Visit about:memory -> "(54.38%) ── heap-unclassified"
   -> click on GC, CC -> the same result
3) Close tab with pdf.js.
4) Visit about:memory again, click on GC, CC.
   -> "(08.48%) ── heap-unclassified"

It looks like we do not count some memory here.

FF version: Firefox 31.0a1 (https://hg.mozilla.org/mozilla-central/rev/4941a2ac0786)
PDF.js version: 0.8.1181
I only got about 20% heap-unclassified when I tried.
Priority: -- → P3
Whiteboard: [MemShrink] → [MemShrink][pdjs-c-performance]
Whiteboard: [MemShrink][pdjs-c-performance] → [MemShrink][pdfjs-c-performance]
tn, were you on Windows?

It's almost certainly due to pdf.js using lots of large canvases. Maybe the Windows graphics code is caching stuff too aggressively.
Blocks: 881974
Whiteboard: [MemShrink][pdfjs-c-performance] → [MemShrink:P2][pdfjs-c-performance]
I tested on mac.
I use Windows 7 64bit, HWA enabled.

Card: Intel(R) HD Graphics Family
Version: 8.15.10.2347
WebGL: Google Inc. -- ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)
Using Nightly on Win7 and Intel HD3000 with HWA enabled I got from opening this pdf:

52.81 MB (14.91%) -- top(http://www.jasnapaka.com/bugs/Rozrod.pdf, id=518)
│  │   ├──50.75 MB (14.33%) -- active/window(http://www.jasnapaka.com/bugs/Rozrod.pdf)
│  │   │  ├──33.84 MB (09.55%) -- js-compartment(resource://pdf.js/web/viewer.html, http://www.jasnapaka.com/bugs/Rozrod.pdf)
│  │   │  │  ├──33.48 MB (09.45%) -- objects
│  │   │  │  │  ├──28.43 MB (08.03%) -- malloc-heap
│  │   │  │  │  │  ├──27.71 MB (07.82%) ── elements/non-asm.js
│  │   │  │  │  │  └───0.72 MB (00.20%) ── slots
│  │   │  │  │  ├───5.05 MB (01.42%) -- gc-heap
│  │   │  │  │  │   ├──3.79 MB (01.07%) ── dense-array
│  │   │  │  │  │   └──1.26 MB (00.36%) ++ (2 tiny)
│  │   │  │  │  └───0.00 MB (00.00%) ── non-heap/code/asm.js
│  │   │  │  └───0.36 MB (00.10%) ++ (4 tiny)
│  │   │  ├──14.03 MB (03.96%) -- layout
│  │   │  │  ├───8.26 MB (02.33%) ++ (7 tiny)
│  │   │  │  └───5.77 MB (01.63%) ── pres-shell
│  │   │  └───2.88 MB (00.81%) ++ (3 tiny)
│  │   └───2.06 MB (00.58%) ++ js-zone(0xaa20400)

42.66 MB (12.05%) -- workers(pdf.js)/worker(../build/pdf.worker.js, 0x12b39000)
│   │  ├──37.36 MB (10.55%) -- zone(0x1299b400)
│   │  │  ├──34.51 MB (09.74%) -- compartment(web-worker)
│   │  │  │  ├──33.30 MB (09.40%) -- objects
│   │  │  │  │  ├──30.88 MB (08.72%) -- malloc-heap
│   │  │  │  │  │  ├──30.62 MB (08.65%) ── elements/non-asm.js
│   │  │  │  │  │  └───0.26 MB (00.07%) ── slots
│   │  │  │  │  └───2.42 MB (00.68%) ++ (2 tiny)
│   │  │  │  └───1.21 MB (00.34%) ++ (4 tiny)
│   │  │  └───2.85 MB (00.81%) ++ (8 tiny)
│   │  └───5.30 MB (01.50%) ++ (3 tiny)

and an increase of 10 MB of heap-unclassified.
Guilherme, could you test with Beta (Firefox 32) so we have a before and after comparison? Thank you!
Flags: needinfo?(guijoselito)
I tried Firefox 31 (release) and Firefox 32 (beta). Couldn't reproduce the problem in any of these versions.
Flags: needinfo?(guijoselito)
You need to log in before you can comment on or make changes to this bug.