Bug 1609201 Comment 10 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Some additional information. I tried to slightly change the logic in the debugger's target creation code. In the current implementation, we do three actions unconditionally: 
- create all worker targets
- get all the service-worker-registrations
- filter the worker targets that match a registration which controls the URL of the current top target

I changed that to only get all the service worker registrations, and then check if we have any sw registration for the current URL. If we do, we fetch worker targets and do the filtering, if we don't, we bail. This means that it should reduce the impact of the feature when debugging pages which don't have a sw. Only the cost of getting the registrations should still apply.

With this change, we have a few interesting results:
First, DAMP: 
- [vs baseline (feature disabled)](https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=try&newProject=try&newRevision=2920cd51f9fa7ffde7f5c004386e5d3ce1b196f3&originalSignature=1759151&newSignature=1759151&framework=12&originalRevision=824b1b0eb2e124e30da533608034a2da8eb56d0c) 
- [vs current implemenation](https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=try&newProject=try&newRevision=2920cd51f9fa7ffde7f5c004386e5d3ce1b196f3&originalSignature=1759151&newSignature=1759151&framework=12&originalRevision=3d42367b4c35a310bc1dece412d72b7f082ff3c9)
The regression is more or less cut in half. Since we don't exercise service workers in our DAMP tests, this means getting the sw registrations is already very costly. 

Now on mochitests, we still get a timeout on the debugger test suite on debug platforms, and the suite still takes around 90 mn. But now it completes at least, it's no longer killed by harness. I was still expecting this to perform better with mochitests. Maybe fetching registrations is especially slow on debug. Normally there is only one debugger test which involves workers, and it runs at the end of the suite. 

Finally, I also tried one of the suggestions mentioned in my last comment: split the ini in several files: https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=try&newProject=try&newRevision=2920cd51f9fa7ffde7f5c004386e5d3ce1b196f3&originalSignature=1759151&newSignature=1759151&framework=12&originalRevision=3d42367b4c35a310bc1dece412d72b7f082ff3c9 . And by doing that all tests passed. I would like to look more at the performance issue around listing registrations now.
Some additional information. I tried to slightly change the logic in the debugger's target creation code. In the current implementation, we do three actions unconditionally: 
- create all worker targets
- get all the service-worker-registrations
- filter the worker targets that match a registration which controls the URL of the current top target

I changed that to only get all the service worker registrations, and then check if we have any sw registration for the current URL. If we do, we fetch worker targets and do the filtering, if we don't, we bail. This means that it should reduce the impact of the feature when debugging pages which don't have a sw. Only the cost of getting the registrations should still apply.

With this change, we have a few interesting results:
First, DAMP: 
- [vs baseline (feature disabled)](https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=try&newProject=try&newRevision=2920cd51f9fa7ffde7f5c004386e5d3ce1b196f3&originalSignature=1759151&newSignature=1759151&framework=12&originalRevision=824b1b0eb2e124e30da533608034a2da8eb56d0c) 
- [vs current implemenation](https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=try&newProject=try&newRevision=2920cd51f9fa7ffde7f5c004386e5d3ce1b196f3&originalSignature=1759151&newSignature=1759151&framework=12&originalRevision=3d42367b4c35a310bc1dece412d72b7f082ff3c9)

The regression is more or less cut in half. Since we don't exercise service workers in our DAMP tests, this means getting the sw registrations is already very costly. 

Now on mochitests, we still get a timeout on the debugger test suite on debug platforms, and the suite still takes around 90 mn. But now it completes at least, it's no longer killed by harness. I was still expecting this to perform better with mochitests. Maybe fetching registrations is especially slow on debug. Normally there is only one debugger test which involves workers, and it runs at the end of the suite. 

Finally, I also tried one of the suggestions mentioned in my last comment: split the ini in several files: https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=try&newProject=try&newRevision=2920cd51f9fa7ffde7f5c004386e5d3ce1b196f3&originalSignature=1759151&newSignature=1759151&framework=12&originalRevision=3d42367b4c35a310bc1dece412d72b7f082ff3c9 . And by doing that all tests passed. I would like to look more at the performance issue around listing registrations now.

Back to Bug 1609201 Comment 10