minio / minio-java

MinIO Client SDK for Java
https://docs.min.io/docs/java-client-quickstart-guide.html
Apache License 2.0
1.13k stars 485 forks source link

High memory consumption #1556

Closed Kress6 closed 6 months ago

Kress6 commented 6 months ago

When creating a service account, two encryption operations are performed (encrypt body and decrypt response). During these operations, an object of 64 MB in size is allocated. initMemory produces an array of objects of size 65536. One object is an array of longs of size 128 (1 KiB) It seems to me that this is redundant, since it requires the allocation of large resources for the application that uses this functionality quite often and in parallel. Judging by the comment, the object should be allocated with 64 KiB, but in fact it is 64 MiB. My suggestion is to reduce the size or allow users to change this setting.

balamurugana commented 6 months ago

Feel free to send a PR. I am closing as of now.