Open Bug 807162 Opened 12 years ago Updated 2 years ago

[meta] IonMonkey: Fix PdfJs performance (octane benchmark)

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

People

(Reporter: nbp, Unassigned)

References

(Depends on 7 open bugs, Blocks 1 open bug)

Details

(Keywords: meta, Whiteboard: [ion:p1])

Attachments

(1 file)

Analyze why PdfJS benchmark is slow and fix issues in separated bugs.
Assignee: general → nicolas.b.pierron
Blocks: 801759
Blocks: 807159
No longer blocks: 801759
This patch move the size based rejection of IonCompilation after the use count, such as we don't get abort noise before attempting an Ion Compilation.
Depends on: 807443
Depends on: 807461
Depends on: 807464
Depends on: 809720
Depends on: 812446
Depends on: 812980
Depends on: 813425
Depends on: 820225
Depends on: 823061
Depends on: 825599
Depends on: 839146
Depends on: 840696
Depends on: 841666
Depends on: 843976
Depends on: 856178
Depends on: 856533
Depends on: 872020
Depends on: 872045
The bounds failures are due to: pdfjs.js:17068, function getToken().

headerString[i] is read before tested if (i < count). Every time (i >= count) we don't use the output of headerString[i], but since it is wrongly scripted the output is requested and observable. As a result we fail the bounds. Fixing this is only possible by adjusting the source code. I cannot see a way to fix this in the engine. The potential loss is 400 points on 12000. So not that big either.
Depends on: 932800
Depends on: 914255
(In reply to Hannes Verschore [:h4writer] from comment #2)
> The bounds failures are due to: pdfjs.js:17068, function getToken().
This will get fixed in bug 932800
Depends on: 932982
Depends on: 939115
Depends on: 958713
Maybe related to this bug,

I noticed that any pdf document (example http://www.lua.org/doc/jucs05.pdf) consumes lot of CPU after initial rendering. The more I zoom-out the document (more visible pages), the more CPU it takes. For example with a 100% Zoom, it takes 15% of CPU in an Intel Core-Duo. When a zoom-out at 25% it takes up to 52%. When I switch to another tab, CPU ussage goes down to 0.0. 
Looks like it's re-rendering in an infinite loop whenever the PDF window is visible.

As reference, Google Chrome takes 0.0% once the initial rendering has been done.

More info:
'top' indicates the CPU is being consumed by the main thread ("firefox" on Linux).
(In reply to Enrique from comment #4)
> Maybe related to this bug,

Certainly not related, no: this bug is about how fast part of what PDF.js does is, not about whether it does any superfluous work. What you describe sounds like an issue with PDF.js, not SpiderMonkey.

If you could open a bug in the PDF.js bug tracker, I'm sure the team would appreciate it: https://github.com/mozilla/pdf.js/issues/
Depends on: 890329
Assignee: nicolas.b.pierron → nobody
Status: ASSIGNED → NEW
Keywords: meta
Priority: -- → P3
Summary: IonMonkey: Fix PdfJs performance (octane benchmark) → [meta] IonMonkey: Fix PdfJs performance (octane benchmark)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: