Bug 204211 - run-webkit-tests loads committers.py 4 times, taking about 40ms
Summary: run-webkit-tests loads committers.py 4 times, taking about 40ms
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
Keywords: InRadar
Depends on:
Reported: 2019-11-14 16:42 PST by Simon Fraser (smfr)
Modified: 2019-11-15 10:01 PST (History)
5 users (show)

See Also:

Patch (2.42 KB, patch)
2019-11-15 08:44 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2019-11-14 16:42:17 PST
diff --git a/Tools/Scripts/webkitpy/common/config/committers.py b/Tools/Scripts/webkitpy/common/config/committers.py
index 0d63ff67c1453120169b4b8652b97fbd15aee6df..df620d5594521e71a298207592b76d75ec9dad44 100644
--- a/Tools/Scripts/webkitpy/common/config/committers.py
+++ b/Tools/Scripts/webkitpy/common/config/committers.py
@@ -32,6 +32,7 @@
 import fnmatch
 import json
 import sys
+import time
 from functools import reduce
 from webkitpy.common.editdistance import edit_distance
@@ -194,7 +195,10 @@ class CommitterList(object):
         if committers or reviewers or contributors:
             self.load_test_data(committers, reviewers, contributors)
+            start = time.time()
+            end = time.time()
+            print 'Loading committers took {}ms'.format(1000 * (end - start))
         self._contributors_by_name = {}
         self._accounts_by_email = {}

Loading committers took 11.5311145782ms
Loading committers took 11.4798545837ms
Loading committers took 9.89007949829ms
Loading committers took 10.3440284729ms
Comment 1 Jonathan Bedard 2019-11-15 08:44:29 PST
Created attachment 383622 [details]
Comment 2 Jonathan Bedard 2019-11-15 08:45:34 PST
Unlike some of our other performance issues in webkitpy, this one is caused by doing something pretty blatantly against Python best practices that is also a very easy fix.
Comment 3 WebKit Commit Bot 2019-11-15 10:00:49 PST
Comment on attachment 383622 [details]

Clearing flags on attachment: 383622

Committed r252489: <https://trac.webkit.org/changeset/252489>
Comment 4 WebKit Commit Bot 2019-11-15 10:00:50 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2019-11-15 10:01:19 PST