Questions about function lcl_GetMergeRange sc/source/core/data/fillinfo.cxx
markus.mohrhard at googlemail.com
Sat Dec 29 10:31:16 PST 2012
> In function lcl_GetMergeRange sc/source/core/data/fillinfo.cxx, what's the
> use to process "bHOver" variable in while (bVOver) ?
It is unused. Just copy pasted code from the bHOver case.
> I thought about these too:
> - declaring nOverlap before the 2 loops, it would avoid to declare it each
> time in the else of both loops.
> - bVOver treatment is useless in first loop, only last loop is relevant
Please don't. These two steps fall under micro-optimization. A
compiler is in the end much better in optimizing the code than we can
do manually so unless profiling shows that we have a performance
problem we should write clean and easy code.
Variables should be defined as late as possible and trying to optimise
bVOver will make the code much more complicated for most likely no
measurable gain. If you really want to improve the performance the
right way is to take a slow operation and use callgrind to get an idea
where to optimise at much higher level than these assignments.
More information about the LibreOffice