To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=100172 Issue #|100172 Summary|performance: framework::KeyMapping should be reused Component|framework Version|OOO310m5 Platform|All URL| OS/Version|All Status|NEW Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|code Assigned to|cd Reported by|hdu
------- Additional comments from [email protected] Fri Mar 13 10:03:22 +0000 2009 ------- While debugging into issue 98052 I noticed that a lot of cycles in that use case (first keypress in empty Writer) are completely wasted by framework::KeyMapping objects. Since the implementation of that class only seems to deal with constant data rebuilding the key<->name maps shouldn't be done each time. Also the query methods in that class should be const-ified, as they don't change the KeyMapping object. Maybe the class should be pImpled and the const pImpl-entation should be reused. Especially the method XCUBasedAcceleratorConfiguration::impl_ts_load() seems to be infamous for constructing/destructing the currently expensive KeyMapping object over and over. In the use case mentioned above (first keypress in Writer) this was done 5460 times!!! Here is a simple patch to reduce the thousands of invocations to one by reusing the (to-be const) object: --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -1287,1 +1287,1 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const - KeyMapping aKeyMapping; + static KeyMapping aKeyMapping; --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
