You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2026/10/11 11:44:36 UTC
[PR] OpcOutputStream: drop synchronized from write [poi]
pjfanning opened a new pull request, #1378:
URL: https://github.com/apache/poi/pull/1378
`OpcOutputStream` is the package-private zip writer behind `OpcZipArchiveOutputStream`, which SXSSF uses to save workbooks. Only `write(byte[], int, int)` was `synchronized`, which was copied from `java.util.zip.ZipOutputStream`. `putNextEntry`, `closeEntry` and `finish` update the same state without a lock, and the stream is only ever used by one thread.
So the lock protected nothing and was taken on every write while saving. It's also behind the SpotBugs AT_NONATOMIC_64BIT_PRIMITIVE / AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE warnings on `written`.
The `xssf.streaming` tests pass, except the auto-size column-width check that depends on local font metrics.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: [PR] OpcOutputStream: drop synchronized from write [poi]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #1378:
URL: https://github.com/apache/poi/pull/1378
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org