Apache OpenOffice (AOO) Bugzilla – Issue 51304
svx/source/form/fmshell.cxx: performance
Last modified: 2008-05-16 03:31:59 UTC
FmFormShell::HasUIFeature( sal_uInt32 nFeature ) ... else if ((nFeature & FM_UI_FEATURE_SHOW_DATANAVIGATOR) == FM_UI_FEATURE_SHOW_DATANAVIGATOR) { access ("foo baa: started", 0); bResult = ( GetImpl()->getDocumentType() == eEnhancedForm ); access ("foo baa: finished", 0); } ... I get ~100ms of work (Linux) done [ strace -ttt output ] between those two accesses. Worse - this links in the large & not-visibility-marked-up 'dbtools' which (as an extra library to search) will further degrade subsequent linkage. The worst thing is - all that library loading goes to waste - since we only care about the boolean == eEnhancedForm state - which a simple query for XFormsSupplier will tell us ;-) I'll knock up a patch in an hour or two to add a quicker 'isEnhancedFoo' helper method there ...
Created attachment 27543 [details] go faster stripes ...
rather a trivial fix.
One for you. Please have a look.
- Please rename isDocumentEnhanced to isEnhancedForm, for reasons of consistency (and, well, better fitting semantics) - In FmXFormShell::isEnhancedForm, please don't duplicate the code from FmXFormShell::getDocumentType, but move it to a common method (getContextDocument or something like this) Duplicated code has a tendency to get out of sync, by fixing bugs in one instance only. - There are several more places in fmshell.cxx which simply compare getDocumentType with eEnhancedForm. They potentially bear the same problem, so please adjust them to use the new method, too. Same for one line in fmview.cxx and navigatortree.cxx, respectively. Other than that, I'd be fine with the patch.
I'll re-work the patch a little today for you if I can :-)
Created attachment 27618 [details] updated patch
thanks :), fine with me now I currently only have one 2.0-CWS which is already in QA, so I cannot easily check in there. Do you have a CWS at hand?
sure - committing to mmeeks09; I'll mark you as qa until we get a better idea.
fixed & marked 'ready for QA'
don't have access to an installation set of the CWS, but applied the patch to one of my installations, and everything looks fine.
This Issue is 'Verified' and not updated in 1yr+, so Closing. A Closed Issue is a Happy Issue (TM). Regards, Andrew Cleaning-up and Closing old Issues as part of: ~ The Grand Bug Squash, pre v3 ~