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

[Test] Improve memory use #18639

Closed
wants to merge 1 commit into from

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Sep 30, 2020

Overview

(just comparing locally at the moment)
https://tomnewby.net/posts/speed-up-phpunit-1-weird-trick/

Before

Running api_v3_ContactTest

Screen Shot 2020-09-30 at 1 58 23 PM

After

Running api_v3_ContactTest
Screen Shot 2020-09-30 at 1 47 30 PM

Technical Details

I'm not too sure how meaningful the time difference is as other activity on my laptop will have an impact - total time with jenkins will be more informative

Comments

@civibot
Copy link

civibot bot commented Sep 30, 2020

(Standard links)

@civibot civibot bot added the master label Sep 30, 2020
@eileenmcnaughton
Copy link
Contributor Author

Definitely looks like a more selective approach is needed!

eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Sep 30, 2020
Cleaning up all objects seems a bit too much - but ensuring we
re-set the DAO we create in this class should be a memory-friendly action

civicrm#18639
eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Sep 30, 2020
Cleaning up all objects seems a bit too much - but ensuring we
re-set the DAO we create in this class should be a memory-friendly action

civicrm#18639
eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Oct 1, 2020
Cleaning up all objects seems a bit too much - but ensuring we
re-set the DAO we create in this class should be a memory-friendly action

civicrm#18639
@eileenmcnaughton
Copy link
Contributor Author

Just to sum up what I learnt here - there is something that persists from test to test that improves efficiency - so better unsetting within tearDowns for the classes helps - but this sledge hammer is overkill

@eileenmcnaughton eileenmcnaughton deleted the test_p2 branch October 1, 2020 05:50
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.

1 participant