Skip to content

Enhanced CSV export - #2928

Merged
selul merged 4 commits into
developmentfrom
feat/2884
Jul 29, 2026
Merged

Enhanced CSV export#2928
selul merged 4 commits into
developmentfrom
feat/2884

Conversation

@girishpanchal30

Copy link
Copy Markdown
Contributor

Fixed #2924 (comment)

Summary

Improved the CSV export functionality by batching the submissions to reduce memory usage and prevent timeouts.

Checklist before the final review

  • Included E2E or unit tests for the changes in this PR.
  • Visual elements are not affected by independent changes.
  • It is at least compatible with the minimum WordPress version.
  • It loads additional script in frontend only if it is required.
  • Does not impact the Core Web Vitals.
  • In case of deprecation, old blocks are safely migrated.
  • It is usable in Widgets and FSE.
  • Copy/Paste is working if the attributes are modified.
  • PR is following the best practices

@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Jul 28, 2026
@girishpanchal30
girishpanchal30 marked this pull request as draft July 28, 2026 14:18
@pirate-bot

Copy link
Copy Markdown
Contributor

Bundle Size Diff

Package Old Size New Size Diff
Animations 178.33 KB 178.33 KB 0 B (0.00%)
Blocks 1.65 MB 1.65 MB 0 B (0.00%)
CSS 7.83 KB 7.83 KB 0 B (0.00%)
Dashboard 172.49 KB 172.49 KB 0 B (0.00%)
Onboarding 68.14 KB 68.14 KB 0 B (0.00%)
Export Import 4.73 KB 4.73 KB 0 B (0.00%)
Pro 439.82 KB 439.82 KB 0 B (0.00%)

@pirate-bot

pirate-bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Plugin build for 5ebc94f is ready 🛎️!

@pirate-bot

pirate-bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

E2E Tests

Playwright Test Status: See serial and parallel matrix jobs

Performance Results serverResponse: {"q25":224.2,"q50":234.5,"q75":247.1,"cnt":10}, firstPaint: {"q25":825.4,"q50":861.8,"q75":959.3,"cnt":10}, domContentLoaded: {"q25":2207.7,"q50":2269.85,"q75":2303.7,"cnt":10}, loaded: {"q25":2209.5,"q50":2271.55,"q75":2305.5,"cnt":10}, firstContentfulPaint: {"q25":2500.5,"q50":2555.8,"q75":2595.3,"cnt":10}, firstBlock: {"q25":8779.4,"q50":8794.95,"q75":8892.6,"cnt":10}, type: {"q25":19.7,"q50":20.12,"q75":23.93,"cnt":10}, typeWithoutInspector: {"q25":16.86,"q50":18.22,"q75":20.02,"cnt":10}, typeWithTopToolbar: {"q25":24.03,"q50":26.46,"q75":31.46,"cnt":10}, typeContainer: {"q25":11.48,"q50":12.88,"q75":13.44,"cnt":10}, focus: {"q25":83.06,"q50":87.3,"q75":94.5,"cnt":10}, inserterOpen: {"q25":28.58,"q50":29.94,"q75":31.33,"cnt":10}, inserterSearch: {"q25":11.15,"q50":11.99,"q75":12.45,"cnt":10}, inserterHover: {"q25":4.48,"q50":4.64,"q75":4.92,"cnt":20}, loadPatterns: {"q25":1135.27,"q50":1169.91,"q75":1245.1,"cnt":10}, listViewOpen: {"q25":150.83,"q50":156.83,"q75":163.66,"cnt":10}

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves CSV submission exports by reducing peak memory usage through batched processing and output streaming.

Changes:

  • Adds two-pass batched CSV generation.
  • Streams CSV rows directly to output.
  • Tests pagination and late-discovered columns.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
inc/plugins/class-form-records-export.php Implements batched, streamed CSV export.
tests/test-form-submissions.php Verifies multi-batch export behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread inc/plugins/class-form-records-export.php Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

inc/plugins/class-form-records-export.php:258

  • WP_Query still defaults cache_results to true, so each distinct batch query stores its returned IDs in the runtime post-queries cache. Since there is one cache entry per batch, memory continues to grow with the total submission count even though the post and metadata entries are deleted, undermining the bounded-memory goal for large exports. Disable query-result caching for these one-shot scans; if that causes get_post_status()/get_the_date() to re-query, pass the returned WP_Post into row construction instead.
				'no_found_rows'          => true,
				'update_post_meta_cache' => false,
				'update_post_term_cache' => false,
				'suppress_filters'       => false,

@selul
selul merged commit d972bbb into development Jul 29, 2026
16 checks passed
@selul
selul deleted the feat/2884 branch July 29, 2026 08:35
@pirate-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.2.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants