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

Remove the remaining usages of new {Name,Cmd} in favor of {Name,Cmd}.get #7171

Merged
merged 1 commit into from
Apr 11, 2016
Merged

Remove the remaining usages of new {Name,Cmd} in favor of {Name,Cmd}.get #7171

merged 1 commit into from
Apr 11, 2016

Conversation

Snuffleupagus
Copy link
Collaborator

Using new {Name,Cmd} should be avoided, since it creates a new object on every call, whereas {Name,Cmd}.get uses caches to only create one object regardless of how many times they are called.

Most of these are found in the unit-tests, where increased memory usage probably doesn't matter very much. But it still seems good to get rid of those cases, since no part of the codebase ought to advertise that usage.

Given the small size of the patch, I'm also tweaking a few comments and class names.

…d}.get`

Using `new {Name,Cmd}` should be avoided, since it creates a new object on *every* call, whereas `{Name,Cmd}.get` uses caches to only create *one* object regardless of how many times they are called.

Most of these are found in the unit-tests, where increased memory usage probably doesn't matter very much. But it still seems good to get rid of those cases, since no part of the codebase ought to advertise that usage.

Given the small size of the patch, I'm also tweaking a few comments and class names.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Apr 8, 2016

From: Bot.io (Windows)


Received

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

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

@pdfjsbot
Copy link

pdfjsbot commented Apr 8, 2016

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/8622228a805cc64/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Apr 8, 2016

From: Bot.io (Windows)


Success

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

Total script time: 20.18 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Apr 8, 2016

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/8622228a805cc64/output.txt

Total script time: 22.40 mins

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

@yurydelendik yurydelendik merged commit 070f2d3 into mozilla:master Apr 11, 2016
@yurydelendik
Copy link
Contributor

Thank you!

@Snuffleupagus Snuffleupagus deleted the remove-new-Name/Cmd branch April 11, 2016 12:38
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.

None yet

3 participants