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

Avoid creating intermediate strings in the PostScriptLexer #5063

Merged
merged 1 commit into from
Jul 28, 2014
Merged

Avoid creating intermediate strings in the PostScriptLexer #5063

merged 1 commit into from
Jul 28, 2014

Conversation

Snuffleupagus
Copy link
Collaborator

No description provided.

@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/86ece2e864b2d57/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://107.22.172.223:8877/86ece2e864b2d57/output.txt

Total script time: 0.62 mins

  • Unit Tests: FAILED

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/a3ff73cf1ab91b2/output.txt

Total script time: 1.08 mins

  • Unit Tests: Passed

@fkaelberer
Copy link
Contributor

Thanks, looks good to me.

@yurydelendik yurydelendik self-assigned this Jul 21, 2014
@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

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

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/58575683d359566/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

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

Total script time: 21.11 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/58575683d359566/output.txt

Total script time: 23.27 mins

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

@@ -177,11 +177,12 @@ var PostScriptLexer = (function PostScriptLexerClosure() {
return PostScriptToken.RBRACE;
}
// operator
var str = String.fromCharCode(ch);
var charBuf = [ch];
Copy link
Contributor

Choose a reason for hiding this comment

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

[ch] creates a new array. will moving charBuf to the scope above and using charBuf.length = 0; be better.

See example at https://github.com/mozilla/pdf.js/blob/master/src/core/parser.js#L555

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in the new commit; also based on #5074 (comment) I've reverted the usage of bytesToString.

@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/8cfe5b4ae1e47d7/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/36b080f959a9f0c/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/36b080f959a9f0c/output.txt

Total script time: 21.12 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/8cfe5b4ae1e47d7/output.txt

Total script time: 22.99 mins

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

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

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

yurydelendik added a commit that referenced this pull request Jul 28, 2014
…ate-string-creation

Avoid creating intermediate strings in the PostScriptLexer
@yurydelendik yurydelendik merged commit 6038ee7 into mozilla:master Jul 28, 2014
@yurydelendik
Copy link
Contributor

Looks good, thanks.

@Snuffleupagus Snuffleupagus deleted the ps-parser-avoid-intermediate-string-creation branch July 28, 2014 20:19
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