enapps-enorman commented on PR #11:
URL: 
https://github.com/apache/sling-org-apache-sling-servlets-get/pull/11#issuecomment-1572561639

   > Base64 is enabled in jcr xml and so far it was okay.
   
   If I am not mistaken, the XMLRenderer streams the xml text to the response.  
I don't believe it loads the whole xml document into memory before writing it 
to the response.  Also, I think it reads the binary property value as an 
InputStream and then writes the base64 text directly to the output writer 
without loading the while file into memory.  In that case, you only need enough 
memory for the small buffer that is consuming the InputStream while 
transforming it to base64.
   
   That may not be possible with the JSON generator apis as it expects the 
whole string so it would likely need much more server side memory (something 
like ~140% the size of the original file) for the base64 conversion to a string.
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to