Title: [212372] trunk/Tools
- Revision
- 212372
- Author
- [email protected]
- Date
- 2017-02-15 09:58:05 -0800 (Wed, 15 Feb 2017)
Log Message
webkitpy: Memoize app_identifier_from_bundle for efficiency, call parent class for _get_crash_log
https://bugs.webkit.org/show_bug.cgi?id=168329
<rdar://problem/30518832>
Reviewed by Daniel Bates.
When testing on device, app_identifier_from_bundle is repeatedly called but the return value will
never change given the same input arguments. Memoize function for efficiency.
* Scripts/webkitpy/port/darwin.py: Add memoized import.
(DarwinPort):
(DarwinPort.app_identifier_from_bundle): Memoize to avoid extra executions of PlistBuddy.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (212371 => 212372)
--- trunk/Tools/ChangeLog 2017-02-15 17:56:44 UTC (rev 212371)
+++ trunk/Tools/ChangeLog 2017-02-15 17:58:05 UTC (rev 212372)
@@ -1,5 +1,21 @@
2017-02-15 Jonathan Bedard <[email protected]>
+ webkitpy: Memoize app_identifier_from_bundle for efficiency, call parent class for _get_crash_log
+ https://bugs.webkit.org/show_bug.cgi?id=168329
+ <rdar://problem/30518832>
+
+ Reviewed by Daniel Bates.
+
+ When testing on device, app_identifier_from_bundle is repeatedly called but the return value will
+ never change given the same input arguments. Memoize function for efficiency.
+
+ * Scripts/webkitpy/port/darwin.py: Add memoized import.
+ (DarwinPort):
+ (DarwinPort.app_identifier_from_bundle): Memoize to avoid extra executions of PlistBuddy.
+
+
+2017-02-15 Jonathan Bedard <[email protected]>
+
webkitpy: Remove unused import from darwin.py
https://bugs.webkit.org/show_bug.cgi?id=168371
Modified: trunk/Tools/Scripts/webkitpy/port/darwin.py (212371 => 212372)
--- trunk/Tools/Scripts/webkitpy/port/darwin.py 2017-02-15 17:56:44 UTC (rev 212371)
+++ trunk/Tools/Scripts/webkitpy/port/darwin.py 2017-02-15 17:58:05 UTC (rev 212372)
@@ -23,6 +23,7 @@
import logging
import os
+from webkitpy.common.memoized import memoized
from webkitpy.common.system.crashlogs import CrashLogs
from webkitpy.common.system.executive import ScriptError
from webkitpy.port.apple import ApplePort
@@ -174,6 +175,7 @@
_log.warn("xcrun failed; falling back to '%s'." % fallback)
return fallback
+ @memoized
def app_identifier_from_bundle(self, app_bundle):
plist_path = self._filesystem.join(app_bundle, 'Info.plist')
if not self._filesystem.exists(plist_path):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes