Commit Graph

5 Commits

Author SHA1 Message Date
Gary Pendergast
786eb29de1 Revisions: Improve performance of WP_Text_Diff_Renderer_Table.
`WP_Text_Diff_Renderer_Table` is used to generate the diff view in revisions, but there were some cases that could cause it to take excessive amounts of time to run.

Some noteable cases include:
- When a large number of new lines were inserted in the middle of the post from one revision to the next.
- When both revisions contain >100 lines.
- When either revision contains a lot of long lines.

In one extreme test case, the diff view took over a minute to generate. With this change, it now takes less than a second.

Merges [43775] from the 5.0 branch to trunk.

Fixes #35667.


Built from https://develop.svn.wordpress.org/trunk@44129


git-svn-id: http://core.svn.wordpress.org/trunk@43959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:04:36 +00:00
Gary Pendergast
aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


Built from https://develop.svn.wordpress.org/trunk@42343


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Drew Jaynes
0860bb2771 Docs: Remove @access notations from method DocBlocks in wp-includes/* classes.
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.

Built from https://develop.svn.wordpress.org/trunk@41162


git-svn-id: http://core.svn.wordpress.org/trunk@41002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 00:41:44 +00:00
Drew Jaynes
66e6776a5e Docs: Add full parameter and return documentation for WP_Text_Diff_Renderer_Table::interleave_changed_lines().
Props coffee2code.
Fixes #38520.

Built from https://develop.svn.wordpress.org/trunk@40971


git-svn-id: http://core.svn.wordpress.org/trunk@40821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 05:29:41 +00:00
Scott Taylor
6620e0b3cc Diff: move WP_Text_Diff_Renderer_inline (behold that lowercase "i") and WP_Text_Diff_Renderer_Table into their own files via svn cp.
See #37827.

Built from https://develop.svn.wordpress.org/trunk@38352


git-svn-id: http://core.svn.wordpress.org/trunk@38293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-25 17:37:30 +00:00