[Tickets #14813] Horde Text Diff crashes when comparing large strings
noreply at bugs.horde.org
noreply at bugs.horde.org
Mon Apr 30 09:40:07 UTC 2018
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: https://bugs.horde.org/ticket/14813
------------------------------------------------------------------------------
Ticket | 14813
Created By | ravijayagopal at gmail.com
Summary | Horde Text Diff crashes when comparing large strings
Queue | Horde Framework Packages
Type | Bug
State | Unconfirmed
Priority | 3. High
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
ravijayagopal at gmail.com (2018-04-30 09:40) wrote:
Hi,
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
More information about the bugs
mailing list