From 657747aca81fc6f4fd8c32551c0aae2ec0f4b0fd Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 10 Dec 2014 09:58:40 +0100 Subject: fdo#85286 android: don't convert objects on load For the WW8 bugdoc, the speedup is 435 -> 98 ms, and the end result is the same from a viewer perspective. Change-Id: I9b6ed3b77748cdc71f373daf07548c6cd0dc732e --- android/mobile-config.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'android') diff --git a/android/mobile-config.py b/android/mobile-config.py index 13085c75b28c..3ad495bc6f1d 100755 --- a/android/mobile-config.py +++ b/android/mobile-config.py @@ -74,6 +74,15 @@ if __name__ == '__main__': print "saved %d of %d bytes: %2.f%%" % (saved, total, saved*100.0/total) + # Don't do pointless Word -> Writer and similar conversions when we have no UI. + microsoftImport = '%(component-schema)s[@%(name)s="Common"]/component/group[@%(name)s="Filter"]/group[@%(name)s="Microsoft"]/group[@%(name)s="Import"]/prop' % { + "component-schema": "{http://openoffice.org/2001/registry}component-schema", + "name": "{http://openoffice.org/2001/registry}name", + } + props = root.findall(microsoftImport) + for prop in props: + prop.findall("value")[0].text = "false" + # The namespace prefixes xs and oor are present in attribute *values*, and namespace # declarations for them are needed, even if no actual elements or attributes with these # namespace prefixes are present. Fun. -- cgit