⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 212372 in webkit


Ignore:
Timestamp:
Feb 15, 2017, 9:58:05 AM (10 years ago)
Author:
Jonathan Bedard
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.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r212368 r212372  
     12017-02-15  Jonathan Bedard  <jbedard@apple.com>
     2
     3        webkitpy: Memoize app_identifier_from_bundle for efficiency, call parent class for _get_crash_log
     4        https://bugs.webkit.org/show_bug.cgi?id=168329
     5        <rdar://problem/30518832>
     6
     7        Reviewed by Daniel Bates.
     8
     9        When testing on device, app_identifier_from_bundle is repeatedly called but the return value will
     10        never change given the same input arguments.  Memoize function for efficiency.
     11
     12        * Scripts/webkitpy/port/darwin.py: Add memoized import.
     13        (DarwinPort):
     14        (DarwinPort.app_identifier_from_bundle): Memoize to avoid extra executions of PlistBuddy.
     15       
     16
    1172017-02-15  Jonathan Bedard  <jbedard@apple.com>
    218
  • trunk/Tools/Scripts/webkitpy/port/darwin.py

    r212368 r212372  
    2424import os
    2525
     26from webkitpy.common.memoized import memoized
    2627from webkitpy.common.system.crashlogs import CrashLogs
    2728from webkitpy.common.system.executive import ScriptError
    … …  
    175176            return fallback
    176177
     178    @memoized
    177179    def app_identifier_from_bundle(self, app_bundle):
    178180        plist_path = self._filesystem.join(app_bundle, 'Info.plist')
Note: See TracChangeset for help on using the changeset viewer.