This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author julianhille
Recipients julianhille
Date 2019-11-22.15:57:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1574438252.97.0.558982385414.issue38895@roundup.psfhosted.org>
In-reply-to
Content
There seems to be a performance issue when creating a Mock() object from unittest module.
The performance difference between 3.7.x and 3.8.0 is about 7-8 times slower in 3.8

Heres the smalles sample i could generate:

Using python 3.7.5

```
python3 -m timeit -v --number=100000 --setup="from unittest.mock import Mock" "Mock()"
raw times: 2.99 sec, 2.96 sec, 3.33 sec, 2.98 sec, 2.92 sec

100000 loops, best of 5: 29.2 usec per loop
```


Using python 3.8.0
```
python3 -m timeit -v --number=100000 --setup="from unittest.mock import Mock" "Mock()"
raw times: 16.9 sec, 17 sec, 17.7 sec, 18.1 sec, 16.3 sec

100000 loops, best of 5: 163 usec per loop

```

I did not find that issue, but a co-worker.
History
Date User Action Args
2019-11-22 15:57:33julianhillesetrecipients: + julianhille
2019-11-22 15:57:32julianhillesetmessageid: <1574438252.97.0.558982385414.issue38895@roundup.psfhosted.org>
2019-11-22 15:57:32julianhillelinkissue38895 messages
2019-11-22 15:57:32julianhillecreate