Closed Bug 1039571 Opened 8 years ago Closed 8 years ago

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

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: vaibhav1994, Unassigned, Mentored)

References

(Blocks 1 open bug)

Details

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.
Blocks: 1036372
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.
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.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Resolution: FIXED → WONTFIX
You need to log in before you can comment on or make changes to this bug.