moto/moto/sqs
jamesandres e38eea751f
Go easier on the CPU when moto sqs is idle
For our local development setup we have found that moto is using around 25% CPU constantly. Digging in with gdb it turned out that it was burning that CPU in the sleeping loop. Here i'm increasing the sleep by 10x which brings the idle CPU usage down by 10x (to ~2%).

I'm not familiar enough with the moto/sqs codebase to know if lengthening this sleep will have an adverse effect; however, in other Python dev I've noticed that (in Python 2.7 anyway..) Python threading won't context switch a thread until a sleep of at least 0.01 seconds is performed (shockingly long!). So based on this guesswork I suspect sleeping for 0.01 seconds won't cause any grief.
2018-10-31 11:39:49 +00:00
..
__init__.py Lints. 2017-02-23 21:37:43 -05:00
exceptions.py Fix creating SQS queue with same attributes. Closes #1663. 2018-05-31 23:05:50 -04:00
models.py Go easier on the CPU when moto sqs is idle 2018-10-31 11:39:49 +00:00
responses.py Force receive_message_wait_time_seconds to be int 2018-08-08 19:14:56 -05:00
urls.py fix receiving of messages from queues with a dot character in their name 2017-08-05 15:47:40 +10:00
utils.py Lints. 2017-02-23 21:37:43 -05:00