/[Apache-SVN]
ViewVC logotype

Revision 1887020


Jump to revision: Previous Next
Author: mariusvolkhart
Date: Mon Mar 1 00:04:51 2021 UTC (3 years, 8 months ago)
Changed paths: 17
Log Message:
Review EscherContainerRecord#getChildRecords() call sites for unnecessary work

This started off as wanting to add the EscherContainerRecord#getChildCount() function in order to do an efficient check for how many children the container has. This was desirable in new code for editing HSSF pictures. The existing option of calling getChildRecords().size() was undesirable as this requires a list copy first.

In the process of finding call sites that would benefit from replacing getChildRecords().size(), I realized that several other patterns would benefit from eliminating a copy, such as iterating over the children in a for-each loop, and indexed access to specific children.

Changed paths

Path Details
Directorypoi/trunk/src/java/org/apache/poi/ddf/EscherContainerRecord.java modified , text changed
Directorypoi/trunk/src/java/org/apache/poi/hssf/model/InternalWorkbook.java modified , text changed
Directorypoi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFShape.java modified , text changed
Directorypoi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowRecordDumper.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFFill.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFPictureShape.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSheet.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/OfficeArtContent.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawingsImpl.java modified , text changed
Directorypoi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBackground.java modified , text changed
Directorypoi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java modified , text changed
Directorypoi/trunk/src/testcases/org/apache/poi/hssf/model/TestDrawingShapes.java modified , text changed
Directorypoi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java modified , text changed
Directorypoi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestPolygon.java modified , text changed
Directorypoi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestText.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26