[wp-trac] [WordPress Trac] #35667: Maximum execution time error in WP_Text_Diff_Renderer_Table

WordPress Trac noreply at wordpress.org
Sun Mar 6 20:16:54 UTC 2016


#35667: Maximum execution time error in WP_Text_Diff_Renderer_Table
--------------------------+-----------------------
 Reporter:  ocean90       |       Owner:  ocean90
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  4.5
Component:  Revisions     |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+-----------------------
Changes (by ocean90):

 * keywords:  has-patch needs-testing => needs-patch


Comment:

 @codex-m `levenshtein()` has only one issue, from the
 [http://php.net/manual/en/function.levenshtein.php#refsect1-function
 .levenshtein-returnvalues docs]:
 > This function returns the Levenshtein-Distance between the two argument
 strings '''or -1, if one of the argument strings is longer than the limit
 of 255 characters'''.

 The MediaWiki extension Translate has a wrapper for `levenshtein()` which
 supports more characters, see
 https://github.com/wikimedia/mediawiki-extensions-
 Translate/blob/master/ttmserver/TTMServer.php#L79-L125.

 The same is used in GlotPress, see https://github.com/GlotPress/GlotPress-
 WP/blob/679d500e5ffbdfed6ac124481780205c3b7854d9/gp-
 includes/strings.php#L114-L175.

 Maybe this implementation works here too?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35667#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list