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

Right-size the array in getSampleArray(). #5191

Merged

Conversation

nnethercote
Copy link
Contributor

This allows the JS engine to do a better job of allocating the right
number of elements for the array, avoiding some resizings. For the PDF
in #2504, this avoids 100s of MiBs of allocations in Firefox.

This allows the JS engine to do a better job of allocating the right
number of elements for the array, avoiding some resizings. For the PDF
in mozilla#2504, this avoids 100s of MiBs of allocations in Firefox.
@CodingFabian
Copy link
Contributor

great. This makes usually sense in places where you know the size beforehand. Especially when the number of elements is high.

@nnethercote
Copy link
Contributor Author

This makes usually sense in places where you know the size beforehand. Especially when the number of elements is high.

Exactly!

@Snuffleupagus
Copy link
Collaborator

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 1

Live output at: http://107.22.172.223:8877/ecea16b2192c0fd/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 1

Live output at: http://107.21.233.14:8877/1cacac80a2c7db9/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/ecea16b2192c0fd/output.txt

Total script time: 19.53 mins

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

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/1cacac80a2c7db9/output.txt

Total script time: 22.46 mins

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

Snuffleupagus added a commit that referenced this pull request Aug 15, 2014
Right-size the array in getSampleArray().
@Snuffleupagus Snuffleupagus merged commit 9d87cbc into mozilla:master Aug 15, 2014
@Snuffleupagus
Copy link
Collaborator

Really good; thank you!

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

Successfully merging this pull request may close these issues.

4 participants