[Tickets #14813] Horde Text Diff crashes when comparing large strings

[email protected]
Newsgroups gmane.comp.horde.bugs
Message-ID <[email protected]>
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://bugs.horde.org/ticket/14813
------------------------------------------------------------------------------
  Ticket             | 14813
  Created By         | [email protected]
  Summary            | Horde Text Diff crashes when comparing large strings
  Queue              | Horde Framework Packages
  Type               | Bug
  State              | Unconfirmed
  Priority           | 3. High
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


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



-- 
bugs mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.