https://issues.apache.org/bugzilla/show_bug.cgi?id=54593
--- Comment #5 from Dominik Stadler <[email protected]> --- Created attachment 30723 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30723&action=edit Initial try of caching the toString() result I gave it a try and implemented caching of the toString() value in XSSFCellBorder and compared elapsed times, below are the raw results, patch is attached. It improves a lot, but there is still a chance that the changes break stuff as there is a getBorder() method which is used elsewhere and could modify the contents of the border whereas the borderStr might be kept, so this mostly shows the potential of doing toString() differently here, however I still think the base implementation is not optimal by causing a lot of stuff in toString() including synchronization, the same might be the case in many other types that derive from XmlObjectBase as well... Before: fileName = /tmp/01.xlsx, doBorders = false elapsed bordering: 0 styles count: 4 elapsed total: 531 fileName = /tmp/02.xlsx, doBorders = true elapsed bordering: 3424 styles count: 68 elapsed total: 3699 fileName = /tmp/01.xlsx, doBorders = false elapsed bordering: 0 styles count: 4 elapsed total: 73 fileName = /tmp/02.xlsx, doBorders = true elapsed bordering: 2181 styles count: 68 elapsed total: 2300 fileName = /tmp/03.xlsx, doBorders = false elapsed bordering: 0 styles count: 4 elapsed total: 73 fileName = /tmp/04.xlsx, doBorders = true elapsed bordering: 1819 styles count: 68 elapsed total: 1902 After: fileName = /tmp/01.xlsx, doBorders = false elapsed bordering: 0 styles count: 4 elapsed total: 269 fileName = /tmp/02.xlsx, doBorders = true elapsed bordering: 1580 styles count: 68 elapsed total: 1856 fileName = /tmp/01.xlsx, doBorders = false elapsed bordering: 0 styles count: 4 elapsed total: 193 fileName = /tmp/02.xlsx, doBorders = true elapsed bordering: 643 styles count: 68 elapsed total: 770 fileName = /tmp/03.xlsx, doBorders = false elapsed bordering: 0 styles count: 4 elapsed total: 55 fileName = /tmp/04.xlsx, doBorders = true elapsed bordering: 424 styles count: 68 elapsed total: 532 -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
