Improve EMF resources performance when using platform paths
CifResource
(and probably resources for other languages) uses StreamCodeBox(AppStream)
, which flushes per line. This is inefficient in EMF for platform resource paths, which use PlatformResourceOutputStream
, where this adds lots of overhead per flush. This is not a problem when using e.g. a FileOutputStream
. Writing files that should take a few milliseconds may then take minutes, so this is a serious performance issue.
We should forgo line-based flushing for writing CIF models, etc. It is not necessary for writing them, as they are typically not written to the command line but to files.
Implementation suggestions:
- Rename
StreamCodeBox
toAppStreamCodeBox
. - Make
OutputStreamCodeBox
with similar functionality, but optional line-based flushing.
Edited by Ferdie Reijnen