Only look at the first 8k of a message when calculating message previews
This commit is contained in:
parent
ac0c2489a0
commit
a78776a9ee
1 changed files with 10 additions and 0 deletions
|
@ -2411,6 +2411,16 @@ public class LocalStore extends Store implements Serializable
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only look at the first 8k of a message when calculating
|
||||||
|
// the preview. This should avoid unnecessary
|
||||||
|
// memory usage on large messages
|
||||||
|
if (text.length() > 8192)
|
||||||
|
{
|
||||||
|
text = text.substring(0,8192);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
text = text.replaceAll("(?m)^----.*?$","");
|
text = text.replaceAll("(?m)^----.*?$","");
|
||||||
text = text.replaceAll("(?m)^[#>].*$","");
|
text = text.replaceAll("(?m)^[#>].*$","");
|
||||||
text = text.replaceAll("(?m)^On .*wrote.?$","");
|
text = text.replaceAll("(?m)^On .*wrote.?$","");
|
||||||
|
|
Loading…
Reference in a new issue