chibenwa opened a new pull request #479:
URL: https://github.com/apache/james-project/pull/479


   Doing so is inefficient as bodies can be very large...
   
   However we should truncate the preview after normalizing
   spaces. So we try to estimate (being defensive) the
   offset of the preview within the original string, to
   only normalize spaces on the portion of the body that
   interest us.
   
   On some IMAP benchmarks, this space normalization occupied
   2% of the CPU, as much as the mime parsing...
   
   Proof:
   
   ## Before
   
   
![preview-before](https://user-images.githubusercontent.com/6928740/120915843-359e5c00-c6d0-11eb-8edf-14ae983d8c10.png)
   
   ## After
   
   
![preview-after](https://user-images.githubusercontent.com/6928740/120915853-3afba680-c6d0-11eb-874d-df08201111f1.png)
   


-- 
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to