Changeset 2661187
- Timestamp:
- 01/21/2022 01:47:29 AM (4 years ago)
- Location:
- fastcomments
- Files:
-
- 40 added
- 3 edited
-
tags/3.10.5 (added)
-
tags/3.10.5/.gitignore (added)
-
tags/3.10.5/LICENSE (added)
-
tags/3.10.5/README.md (added)
-
tags/3.10.5/README.txt (added)
-
tags/3.10.5/admin (added)
-
tags/3.10.5/admin/fastcomments-admin-advanced-settings-view.js (added)
-
tags/3.10.5/admin/fastcomments-admin-advanced-settings-view.php (added)
-
tags/3.10.5/admin/fastcomments-admin-manual-sync-view.js (added)
-
tags/3.10.5/admin/fastcomments-admin-manual-sync-view.php (added)
-
tags/3.10.5/admin/fastcomments-admin-setup-view.js (added)
-
tags/3.10.5/admin/fastcomments-admin-setup-view.php (added)
-
tags/3.10.5/admin/fastcomments-admin-sso-view.css (added)
-
tags/3.10.5/admin/fastcomments-admin-sso-view.js (added)
-
tags/3.10.5/admin/fastcomments-admin-sso-view.php (added)
-
tags/3.10.5/admin/fastcomments-admin-support-view.php (added)
-
tags/3.10.5/admin/fastcomments-admin-view.php (added)
-
tags/3.10.5/admin/fastcomments-admin.css (added)
-
tags/3.10.5/admin/fastcomments-admin.php (added)
-
tags/3.10.5/admin/images (added)
-
tags/3.10.5/admin/images/api.png (added)
-
tags/3.10.5/admin/images/crown.png (added)
-
tags/3.10.5/admin/images/css.png (added)
-
tags/3.10.5/admin/images/debugging.png (added)
-
tags/3.10.5/admin/images/download.png (added)
-
tags/3.10.5/admin/images/home.png (added)
-
tags/3.10.5/admin/images/logo-50.png (added)
-
tags/3.10.5/admin/images/logo.png (added)
-
tags/3.10.5/admin/images/settings.png (added)
-
tags/3.10.5/admin/images/support.png (added)
-
tags/3.10.5/admin/images/sync-status.png (added)
-
tags/3.10.5/admin/images/sync.png (added)
-
tags/3.10.5/core (added)
-
tags/3.10.5/core/FastCommentsIntegrationCore.php (added)
-
tags/3.10.5/core/FastCommentsWordPressIntegration.php (added)
-
tags/3.10.5/fastcomments-wordpress-plugin.php (added)
-
tags/3.10.5/public (added)
-
tags/3.10.5/public/fastcomments-public.php (added)
-
tags/3.10.5/public/fastcomments-widget-view.php (added)
-
tags/3.10.5/uninstall.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/core/FastCommentsIntegrationCore.php (modified) (4 diffs)
-
trunk/fastcomments-wordpress-plugin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fastcomments/trunk/README.txt
r2660486 r2661187 4 4 Requires at least: 4.6 5 5 Tested up to: 5.8 6 Stable tag: 3.10. 47 Requires PHP: 5.2. 46 Stable tag: 3.10.5 7 Requires PHP: 5.2.5 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 85 85 86 86 == Changelog == 87 88 = 3.10.5 = 89 * Improvements to the chunk splitting algorithm for initial setup. No longer gets stuck on sites with very large number of large comments. 87 90 88 91 = 3.10.4 = -
fastcomments/trunk/core/FastCommentsIntegrationCore.php
r2613148 r2661187 274 274 $countRemaining = $commentCount; 275 275 $chunkSize = 100; 276 276 277 if ($countRemaining > 0) { 277 278 $commentChunks = array_chunk($getCommentsResponse['comments'], $chunkSize); … … 282 283 $dynamicChunks = array($chunk); 283 284 while ($chunkAttemptsRemaining > 0) { 285 processChunks: 284 286 foreach ($dynamicChunks as $dynamicChunk) { 285 287 $lastComment = $dynamicChunk[count($dynamicChunk) - 1]; … … 292 294 ) 293 295 ); 296 $dynamicChunkSizeActual = count($dynamicChunk); 294 297 $httpResponse = $this->makeHTTPRequest('POST', "$this->baseUrl/comments?token=$token", $requestBody); 295 298 $this->log('debug', "Got POST /comments response status code=[$httpResponse->responseStatusCode] and chunk size $dynamicChunkSize"); … … 311 314 } else if ($httpResponse->responseStatusCode === 413 && $dynamicChunkSize > 1) { 312 315 $this->log('debug', "$dynamicChunkSize too big, splitting."); 313 $dynamicChunks = array_chunk($chunk, max((int)($dynamicChunkSize / 10), 1)); 314 break; // break out of the dynamic chunks loop and run it again 316 $dynamicChunkSize = (int)($dynamicChunkSize / 10); 317 $dynamicChunks = array_chunk($chunk, max($dynamicChunkSize, 1)); 318 $chunkAttemptsRemaining--; 319 if ($chunkAttemptsRemaining > 0) { 320 goto processChunks; // break out of the dynamic chunks loop and run it again. yes goto is terrible but lot of work to refactor/test this. 321 } 315 322 } 316 323 } -
fastcomments/trunk/fastcomments-wordpress-plugin.php
r2660486 r2661187 4 4 Plugin URI: https://fastcomments.com 5 5 Description: Live Comments, Fast. A comment system that will delight your users and developers. 6 Version: 3.10. 46 Version: 3.10.5 7 7 Author: winrid @ FastComments 8 8 License: GPL-2.0+ … … 14 14 } 15 15 16 $FASTCOMMENTS_VERSION = 3.10 4;16 $FASTCOMMENTS_VERSION = 3.105; 17 17 18 18 require_once plugin_dir_path(__FILE__) . 'admin/fastcomments-admin.php';
Note: See TracChangeset
for help on using the changeset viewer.