Skip to content

[PHPLIB-112] Configurable type map for findAndModify and non-cursor aggregate commands #300

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

Merged
merged 3 commits into from
Dec 5, 2016

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Dec 5, 2016

@jmikola
Copy link
Member Author

jmikola commented Dec 5, 2016

Benchmark script: https://gist.github.com/jmikola/a6efe8d512615f36b7c6df87951fd4a2

Profiles:

Comparing large nesting, the typeMap option adds 113% execution time and and heavily waited in the toPHP() call (17.2s vs. 4.85s spent in fromPHP()). This is likely due to each sub-document requiring a new BSONDocument construction and call to BSONDocument::bsonUnserialize().

Comparing small nesting, the typeMap option adds 74.9% execution time and is roughly split evenly between fromPHP() and toPHP() calls.

@jmikola jmikola changed the title [WIP] [PHPLIB-112] Support typeMap option for command helpers [PHPLIB-112] Configurable type map for findAndModify and non-cursor aggregate commands Dec 5, 2016
jmikola added a commit to jmikola/mongo-php-library that referenced this pull request Dec 5, 2016
@jmikola jmikola merged commit 3b6b96e into mongodb:master Dec 5, 2016
@jmikola jmikola deleted the phplib-112 branch December 5, 2016 19:57
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.

1 participant