Open JamesHutchison opened 1 year ago
A quick measurement shows this saves about 200 ms so it doesn't seem like a very big win, but I could see some circumstances where maybe pytest, combined with other heavier plugins, may see a benefit from this.
Also, if this is taken on, check whether the pytest_load_initial_conftests
hook gives similar performance and is usable, eliminating the need for this feature.
After some evaluation and measuring, my suspicion is that this is unnecessary with the existing logic. The reason is that we're now aborting earlier before plugins really get a chance to work. I suppose there might be a plugin that still adds overhead you may want to skip, but maybe it makes sense for something like that to come along.
Since this run as a pytest plugin, there's some overhead from pytest that seems to be difficult to avoid. Specifically, pytest needs to get to the point where it loads its plugins, then from there eventually get to this plugin before switching to the client logic. The developer can have things run even faster by just jumping straight to the client logic. This ticket is to add this functionality in case a developer wants to use it. Here's a simple example that can be added to
client.py
Of course, this is missing the host/port configurability