Closed Bug 1981848 Opened 10 months ago Closed 10 months ago

cache manifestparser expression parsing

Categories

(Firefox Build System :: Task Configuration, task)

task

Tracking

(firefox143 fixed)

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: bhearsum, Assigned: bhearsum)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

manifestparser's expression parsing repeatedly tokenizes the same text over and over, and also re-evaluates the same tokenized expression with the same values over and over.

On my local machine I measured the time between "Loading tasks for kind test" and "Generated xxxxx tasks for kind test" (this encompasses all of the time spent running test transforms, which is where this code is called from). I got the following results:
Without the patch: 88s, 91s, 90s
With the patch: 76s, 75s, 75s

I ran a few decision tasks on Try pushes with and without this patch and got the following results:
Without the patch: 106s, 107s, 106s
With the patch: 89s, 94s, 89s

So, clear savings in decision tasks as well, and at least in the case of my machine, about 30 seconds removed from the critical path of try results.

At two points:

  1. The parsing of the raw expression from a manifest
  2. The evaluation of the expression with final values

Both of these things are done repeatedly.

On my local machine I measured the time between "Loading tasks for kind test" and "Generated xxxxx tasks for kind test" (this encompasses all of the time spent running test transforms, which is where this code is called from). I got the following results:
Without the patch: 88s, 91s, 90s
With the patch: 76s, 75s, 75s

I ran a few decision tasks on Try pushes with and without this patch and got the following results:
Without the patch: 106s, 107s, 106s
With the patch: 89s, 94s, 89s

So, clear savings in decision tasks as well, and at least in the case of my machine, about 30 seconds removed from the critical path of try results.

Blocks: 1840828
Pushed by ctuns@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/254f5069e10c https://hg.mozilla.org/integration/autoland/rev/d3b249669ce0 Revert "Bug 1981848: cache test manifest expression parsing r=jmaher" for causing multiple errors AttributeError related.

Backed out for causing multiple failures

https://treeherder.mozilla.org/logviewer?job_id=521601670&repo=autoland
Failure line: AttributeError: module 'functools' has no attribute 'cache'

Flags: needinfo?(bhearsum)

self.version is a list, which cannot be hashed.

Flags: needinfo?(bhearsum)
Regressions: 1982119
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a0a64fd617be https://hg.mozilla.org/integration/autoland/rev/7c811cd3bb44 Revert "Bug 1981848: make mozinfo's StringVersion.__hash__ work r=jmaher" for causing multiple perftests failures.

Reverted this because it was causing multiple perftests failures.

Flags: needinfo?(bhearsum)

In another commit in this stack, we're relying on being able to hash values for some performance wins.

(In reply to Serban Stanca [:SerbanS] from comment #8)

Reverted this because it was causing multiple perftests failures.

Thanks; I've got a new patch up that fixes this. I also audited for other calls that be passing unhashable types and couldn't find any others...

Flags: needinfo?(bhearsum)
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: