Bug 84090 - Speed up oox::TokenMap by removing unnecessary maUniName OUString
Summary: Speed up oox::TokenMap by removing unnecessary maUniName OUString
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.4.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2014-09-19 11:08 UTC by Matúš Kukan
Modified: 2016-02-18 16:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matúš Kukan 2014-09-19 11:08:32 UTC
This task is about removing maUniName from include/oox/token/tokenmap.hxx
which stores the same content as maUtf8Name in another form and is used mostly for debugging purposes only.
Where TokenMap::getUnicodeTokenName was used, one can use TokenMap::getUtf8TokenName

Remove maUniName from struct TokenName, that struct can then also die, and do following simplifications / adaptations.

We used to spend 10m pseudo cycles in TokenMap constructor, this should save about a half of that.
Comment 1 Siddu 2014-09-20 17:11:04 UTC
Sudarshan Rao proposed a change to core: Changed getUnicodeTokenName to getUtf8TokenName.  https://gerrit.libreoffice.org/11558.
Comment 2 Siddu 2014-09-21 06:27:28 UTC
(In reply to comment #0)
> This task is about removing maUniName from include/oox/token/tokenmap.hxx
> which stores the same content as maUtf8Name in another form and is used
> mostly for debugging purposes only.
> Where TokenMap::getUnicodeTokenName was used, one can use
> TokenMap::getUtf8TokenName
> 
> Remove maUniName from struct TokenName, that struct can then also die, and
> do following simplifications / adaptations.
> 
> We used to spend 10m pseudo cycles in TokenMap constructor, this should save
> about a half of that.

Can you be more precise as to what we have to do here ?
Comment 3 Siddu 2014-09-21 08:07:11 UTC
(In reply to comment #0)
> This task is about removing maUniName from include/oox/token/tokenmap.hxx
> which stores the same content as maUtf8Name in another form and is used
> mostly for debugging purposes only.
> Where TokenMap::getUnicodeTokenName was used, one can use
> TokenMap::getUtf8TokenName
> 
> Remove maUniName from struct TokenName, that struct can then also die, and
> do following simplifications / adaptations.
> 
> We used to spend 10m pseudo cycles in TokenMap constructor, this should save
> about a half of that.

1.Do I have to replace the method getUnicodeTokenName with getUtf8TokenName in tokenmap.cxx?
2. After removing maUniName what do you mean the entire struct i.e TokenName can die ?
Comment 4 Matúš Kukan 2014-09-22 06:30:15 UTC
(In reply to comment #2)
> Can you be more precise as to what we have to do here ?

Change:
typedef ::std::vector< TokenName > TokenNameVector;
to
typedef ::std::vector< css::uno::Sequence< sal_Int8 > > TokenNameVector;
And remove TokenMap
Also remove TokenMap::getUnicodeTokenName
And make it compile ;-) ..
which also means you will have to use getUtf8TokenName and do some conversions.
Comment 5 Commit Notification 2014-09-23 06:10:48 UTC
David Ostrovsky committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0ea9722f72c1bece218013cce4c5d9097994408f

fdo#84090: Remove maUniName from oox::TokenMap



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Julien Nabet 2014-11-30 15:44:04 UTC
So fixed by David's patch, see https://bugs.freedesktop.org/show_bug.cgi?id=84090#c5
Comment 7 Robinson Tryon (qubit) 2015-12-15 23:57:27 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp TopicCleanup)
[NinjaEdit]
Comment 8 Robinson Tryon (qubit) 2016-02-18 16:37:07 UTC
Remove LibreOffice Dev List from CC on EasyHacks
(curtailing excessive email to list)
[NinjaEdit]