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

restore_error_handler, typehint #53

Merged
merged 2 commits into from
Oct 15, 2018

Conversation

seferov
Copy link
Contributor

@seferov seferov commented Oct 15, 2018

minor enhancements:

  • restore_error_handler should be called where set_error_handler set
  • add typehint for private method

@seferov seferov changed the title restore_error_handler, phpdoc fix, typehint restore_error_handler, typehint Oct 15, 2018
$this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString);

restore_error_handler();
try {
Copy link
Member

Choose a reason for hiding this comment

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

Please run the benchmarks before/after the patch as well: adding more try blocks has an impact here

@seferov
Copy link
Contributor Author

seferov commented Oct 15, 2018

Before patch

subject mem_peak time_rev
benchInstantiateSelf 1,112,912b 2.616μs
benchInstantiateInternalClass 1,112,920b 2.964μs
benchInstantiateSimpleSerializableAssetClass 1,112,944b 2.829μs
benchInstantiateSerializableArrayObjectAsset 1,112,944b 3.074μs
benchInstantiateUnCloneableAsset 1,112,928b 4.368μs

After patch

subject mem_peak time_rev
benchInstantiateSelf 1,112,928b 2.777μs
benchInstantiateInternalClass 1,112,936b 2.985μs
benchInstantiateSimpleSerializableAssetClass 1,112,960b 2.598μs
benchInstantiateSerializableArrayObjectAsset 1,112,960b 2.943μs
benchInstantiateUnCloneableAsset 1,112,944b 4.328μs

skipped same data for both tables

Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

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

Looks like there's a lot of deviation in the benchmark results, but the values don't deviate too much from the existing ones, so 👍

@Ocramius Ocramius self-assigned this Oct 15, 2018
@Ocramius Ocramius added this to the 1.2.0 milestone Oct 15, 2018
@Ocramius Ocramius merged commit 8c8c1af into doctrine:master Oct 15, 2018
@Ocramius
Copy link
Member

Thanks @seferov

@seferov seferov deleted the instantiator-tidy-up branch October 15, 2018 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants