Discovery PR tests are 2 times slower than core


I am out of ideas so seeking for help. Discovery PR test on jenkins calls the standard plugin test rake task which is supposed to test plugin and then call also all core tests with the plugin installed to find it if the plugin does not break something.

Recently, tests started to hit 2 hours limit we have on jenkins, for some reason only for Ruby 2.7 (which is supposed to be the fastest out of the three). I can’t find why this happens.

Normally, core tests run for about 40 minutes. But discovery runs core tests about 2x slower. There must be something really bad, maybe some option that makes all tests that slow.

Discovery does not appear to add any fixtures or override base classes.

I am trying to run those rake tasks locally to find out how discovery is really off because jobs are executed on different nodes and this can screw any comparisons but if you have an idea let me know. I would like to see discovery tests close to the 40 minutes or under one hour rather than 1:30 when we are lucky and 2 hours when unlucky.