Decrease the number of times we parse the manifest inside runtests.py

RESOLVED WONTFIX

Status

Testing
Mochitest
RESOLVED WONTFIX
3 years ago
3 years ago

People

(Reporter: vaibhav1994, Unassigned, Mentored)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
We parse the manifest 3 times inside runtests.py, when we call the getActiveTests function:

1) http://dxr.mozilla.org/mozilla-central/source/testing/mochitest/runtests.py#1384

2) http://dxr.mozilla.org/mozilla-central/source/testing/mochitest/runtests.py#466

3) inside the getDirectories function: http://dxr.mozilla.org/mozilla-central/source/testing/mochitest/runtests.py#1865

If we can decrease the number of times manifests are parsed, it will make the code better and reduce the runtime.
(Reporter)

Updated

3 years ago
Blocks: 1036372
(Reporter)

Comment 1

3 years ago
I think that removing of parsing manifest in getDirectories is not a good idea because we still have to filter the tests to run for each loop which will still have almost the same time complexity as the current implementation.
that makes sense. I am not worried about overhead of parsing, just not doing something twice if we don't need to.

Can we parse the list once and keep it as a master list, then pass the current list to our loop?  If that doesn't make sense, then we can resolve this as wontfix.
(Reporter)

Comment 3

3 years ago
Yes, we may keep a master list but that will add a lot of overhead if we add more functions in future, plus we are not saving significant time.

Also, we need to have a call to getActiveTests method in buildTestPath because b2g emulator directly calls the function to parse manifest. I did a try run by removing the parsing of manifest: https://tbpl.mozilla.org/?tree=Try&rev=a56913e0af1, but it failed on b2g emulator.
(Reporter)

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Reporter)

Updated

3 years ago
Resolution: FIXED → WONTFIX
You need to log in before you can comment on or make changes to this bug.