Starting the CherryPy server multi-threaded #11
Labels
No labels
dependencies
improvement
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: archive/django-pyvows#11
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As it stands now the CherryPy Server started by the DjangoHTTPContext.start_server() function is hardcoded to only have one thread in the thread pool. This is probably not much of an issue when running unit tests, but I'm trying to use this to run gui tests with selenium against multiple browsers. This can cause things to run really slowly. Consider the following code snippet.
On my machine this takes about 22 seconds. I could of course create the server inside of each child context but that just seems wasteful. So I would like the ability to pass in the threadcount to the start_server function so I can use the same code but start the server with multiple threads. Then performance will be greatly improved.... roughly 1.8 seconds on my machine.
I'll submit a pull request with the change, this issue is to document the purpose of that pull request.
Thanks,
Jeremy
Your pull request was already accepted. So, I will close this issue. Thank you for your collaboration. 👍