Bug 970123 - Avoid read-aheading icudt52.dll for better startup performance; r=glandium
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 18 Feb 2014 01:30:36 -0500
changeset 169234 0050e64d10c85e32f2af391b843a01683de7c4bb
parent 169233 4bc79e20fae008e6070ce25db98f0774e6cc4239
child 169235 6a647f7bafe2d71086d1c52413ad2ec9122ba5e7
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersglandium
bugs970123
milestone30.0a1
Bug 970123 - Avoid read-aheading icudt52.dll for better startup performance; r=glandium
toolkit/library/dependentlibs.py
--- a/toolkit/library/dependentlibs.py
+++ b/toolkit/library/dependentlibs.py
@@ -98,17 +98,21 @@ def dependentlibs(lib, libpaths, func):
     deps = []
     for dep in func(lib):
         if dep in deps or os.path.isabs(dep):
             continue
         for dir in libpaths:
             deppath = os.path.join(dir, dep)
             if os.path.exists(deppath):
                 deps.extend([d for d in dependentlibs(deppath, libpaths, func) if not d in deps])
-                deps.append(dep)
+		# Black list the ICU data DLL because preloading it at startup
+		# leads to startup performance problems because of its excessive
+		# size (around 10MB).
+		if not dep.startswith("icudt"):
+                    deps.append(dep)
                 break
 
     return deps
 
 def main():
     parser = OptionParser()
     parser.add_option("-L", dest="libpaths", action="append", metavar="PATH", help="Add the given path to the library search path")
     parser.add_option("-p", dest="toolchain_prefix", metavar="PREFIX", help="Use the given prefix to readelf")