Summary | Horde Text Diff crashes when comparing large strings |
Queue | Horde Framework Packages |
Type | Bug |
State | No Feedback |
Priority | 1. Low |
Owners | |
Requester | ravijayagopal (at) gmail (dot) com |
Created | 04/30/2018 (2727 days ago) |
Due | |
Updated | 06/13/2018 (2683 days ago) |
Assigned | |
Resolved | 06/13/2018 (2683 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Priority ⇒ 1. Low
web server error log...
Try bumping up php's memory limit. You don't provide any details on
your configuration so it's hard to give any further assistance.
If you think it's a memory issue, try writing a test case that
demonstrates this.
Priority ⇒ 3. High
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Horde Text Diff crashes when comparing large strings
Type ⇒ Bug
State ⇒ Unconfirmed
I have a web app live in production, that compares two large strings,
less than 5 MB in size.
And it's crashing right at the 3rd line below. Doesn't get past line 3 below.
$diff = new Horde_Text_Diff('auto', array( explode("\n", $contentsOld)
, explode("\n", $contentsNew) ) );
$renderer = new Horde_Text_Diff_Renderer_Inline();
$diff = $renderer->render($diff);
$contentsOld and $contentsNew contain the two large strings - one read
from a MySQL mediumtext field, and another coming from
file_get_contents of a URL. Works fine for most use cases, but crashes
when it gets above a certain size. I'm guessing around the 4-5 MB size.
Is there any way to get it to exit gracefully? It doesn't seem to be
throwing any exceptions either.
And is there a way to know exactly where it's failing?
Thanks!
- Ravi