Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make IdentityCMaps more compact. #5135

Merged
merged 1 commit into from
Aug 6, 2014

Conversation

nnethercote
Copy link
Contributor

IdentityCMap uses an array to represent a 16-bit unsigned identity
function. This is very space-inefficient, and some files cause multiple
IdentityCMaps to be instantiated (e.g. the one from #4580 has 74).

This patch make the representation implicit.

When loading the PDF from issue #4580, this change reduces peak RSS from
~370 to ~280 MiB. It also improves overall speed on that PDF by ~30%,
going from 522 ms to 366 ms.

IdentityCMap uses an array to represent a 16-bit unsigned identity
function. This is very space-inefficient, and some files cause multiple
IdentityCMaps to be instantiated (e.g. the one from mozilla#4580 has 74).

This patch make the representation implicit.

When loading the PDF from issue mozilla#4580, this change reduces peak RSS from
~370 to ~280 MiB. It also improves overall speed on that PDF by ~30%,
going from 522 ms to 366 ms.
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2014

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/2a1b63b66634ec9/output.txt

@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2014

From: Bot.io (Linux)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/6add700436da8e4/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2014

From: Bot.io (Windows)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://107.22.172.223:8877/5536969f090a58a/output.txt

@Snuffleupagus
Copy link
Collaborator

Nice; this patch also improves the performance of #4935.

@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2014

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/5536969f090a58a/output.txt

Total script time: 19.63 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2014

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/6add700436da8e4/output.txt

Total script time: 22.57 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@timvandermeij
Copy link
Contributor

The rendering time for #4935 went down from 12225 ms to 7077 ms, a 43% decrease!

@yurydelendik yurydelendik self-assigned this Aug 5, 2014
@nnethercote
Copy link
Contributor Author

The rendering time for #4935 went down from 12225 ms to 7077 ms, a 43% decrease!

And peak RSS dropped from ~2800 MiB to ~2400. Still too high, though; I'll do some more profiling.

yurydelendik added a commit that referenced this pull request Aug 6, 2014
@yurydelendik yurydelendik merged commit 5786014 into mozilla:master Aug 6, 2014
@yurydelendik
Copy link
Contributor

Really good. Thank you for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants