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

Use null instead of [] for ops with no args. #4982

Merged
merged 1 commit into from
Jun 23, 2014

Conversation

nnethercote
Copy link
Contributor

This reduces peak RSS on one test file from ~600 to ~560 MiB.

@Snuffleupagus
Copy link
Collaborator

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/277bf98d9b6916c/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/d03ce7c673db512/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/277bf98d9b6916c/output.txt

Total script time: 21.32 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/d03ce7c673db512/output.txt

Total script time: 23.87 mins

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

@@ -2127,28 +2132,34 @@ var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() {

if (!opSpec.variableArgs) {
// Some post script commands can be nested, e.g. /F2 /GS2 gs 5.711 Tf
if (args.length !== numArgs) {
var argsLength = args ? args.length : 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could do args !== null for a faster and stricter check.

This reduces peak RSS on one test file from ~600 to ~560 MiB.
@nnethercote
Copy link
Contributor Author

I updated the patch as per Fabian's suggestion.

@Snuffleupagus
Copy link
Collaborator

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/4ecfa9ad13dfe3f/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

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

Total script time: 21.20 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/4ecfa9ad13dfe3f/output.txt

Total script time: 23.97 mins

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

yurydelendik added a commit that referenced this pull request Jun 23, 2014
Use null instead of [] for ops with no args.
@yurydelendik yurydelendik merged commit 3ad58db into mozilla:master Jun 23, 2014
@yurydelendik
Copy link
Contributor

Thank you for the patch

@nnethercote nnethercote deleted the use-null-for-zero-args branch August 6, 2014 00:41
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