You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Access to the underlying byte[] copies the array which can increase memory pressure in some high throughput scenarios where large buffers are involved;
Many methods are synchronized.
Issues with ByteArrayInputStream:
Many methods are synchronized.
Implement a new class which can provide InputStream and OutputStream accessors, using a single byte[] which can be resized if needed, or avoid array copies if an ideal size is given to begin with.
Replace ByteArrayOutputStream and ByteArrayInputStream where they are used to compress/decompress resource payloads.
The text was updated successfully, but these errors were encountered:
I ran an export after getting this change deployed and the performance looks good to me:
INFO bulkexportfastjob[164] processed 138753 resources in 21.34 seconds (rate=6501.5 resources/second)
INFO bulkexportfastjob[164] Patient 32618
INFO bulkexportfastjob[164] Condition 360376
INFO bulkexportfastjob[164] Observation 6359819
INFO bulkexportfastjob[164] -------------------------------- ----------
INFO bulkexportfastjob[164] TOTAL 6752813
Prior to this change, I'd seen export times over 10,000 resources/second, but back then we were also leaking memory (due to #2040 ).
Lets call this one 'good' and we can revisit in the future as part of a broader performance analysis.
Issues with ByteArrayOutputStream:
Issues with ByteArrayInputStream:
Implement a new class which can provide InputStream and OutputStream accessors, using a single byte[] which can be resized if needed, or avoid array copies if an ideal size is given to begin with.
Replace ByteArrayOutputStream and ByteArrayInputStream where they are used to compress/decompress resource payloads.
The text was updated successfully, but these errors were encountered: