Allowed memory size of 512MB bytes exhausted during diff
Looking through my log files with the latest version 2.8.3 , I noticed the following problem:
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 135168 bytes) in diff_util.php on line 68
The URL is: https://svn.viathinksoft.com/websvn/diff.php?path=/trunk/bin/webreader.phar&repname=vnag&rev=88
In case you need the SVN working copy:
svn co https://svn.viathinksoft.com/svn/vnag
It is a bit surprising because webreader.phar is a rather small file. However, it is a binary file, so I guess the diff util goes crazy?
Check this https://github.com/websvnphp/websvn/issues/128 I did not get time to work on it as after raising the memory limit but it didnt recur and was then not priotize.
Stupid question: Does using diff(1) make any difference or is just the processing of a unified diff problematic in PHP itself?
@michael-o You mean the "diff" command in Linux? I think it does not allow binary files to be diff'ed. I guess the PHP script levenshtein2 takes too much memory, because the files are too hard to diff, because they are either binary, or if they are "too much unequal"
I am a bit confused. The file is are regular text file and this works: https://svn.viathinksoft.com/websvn/comp.php?repname=vnag&compare[]=%2Ftrunk%2Fbin%2Fwebreader.phar@88&compare[]=%2Ftrunk%2Fbin%2Fwebreader.phar@89
...https://packagist.org/?query=levenstein
@michael-o I don't know the internals of the algorithm, so I cannot help much.
About the PHAR files, I call them binary because they contain control characters in between which are not text. To be fair, a large portion of the PHAR files is text, though.
I do not know why diff.php crashes and comp.php not.