Skip to content

Conversation

@norberttech
Copy link
Member

Change Log

Added

Fixed

  • batch size optimization for deeply nested pipelines

Changed

Removed

Deprecated

Security


Description

@norberttech norberttech linked an issue May 8, 2025 that may be closed by this pull request
@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2025

Flow PHP - Benchmarks

Results of the benchmarks from this PR are compared with the results from 1.x branch.

Extractors
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
| benchmark             | subject           | revs | its | mem_peak        | mode             | rstdev          |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.888mb +0.02%  | 611.889ms -0.09% | ±0.21% -37.21%  |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 5.468mb +0.05%  | 1.355s +1.30%    | ±0.08% -79.87%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 86.485mb +0.00% | 931.731ms +2.32% | ±0.53% -43.66%  |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.612mb +0.03%  | 38.767ms -1.30%  | ±0.16% -74.24%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.587mb +0.03%  | 614.332ms +0.22% | ±1.45% +242.54% |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 127.410mb +0.00% | 69.060ms +0.06% | ±0.30% -65.79% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev         |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 64.055mb +0.00%  | 103.980ms -2.28% | ±0.86% -4.47%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 84.087mb +0.00%  | 97.908ms +0.64%  | ±0.62% -52.43% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 166.569mb +0.00% | 20.747s +0.54%   | ±0.24% -2.92%  |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 18.145mb +0.01%  | 30.995ms +2.81%  | ±0.84% -75.18% |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
Building Blocks
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark         | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 44.053mb +0.00%  | 459.832ms +0.24% | ±0.12% -79.87%  |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 11.862mb +0.01%  | 93.006ms -0.83%  | ±0.63% +8.07%   |
| RowsBench         | bench_chunk_10_on_10k      | 2    | 3   | 97.072mb +0.00%  | 3.712ms +19.02%  | ±1.39% +31.35%  |
| RowsBench         | bench_diff_left_1k_on_10k  | 2    | 3   | 114.428mb +0.00% | 186.108ms +0.90% | ±1.27% +18.19%  |
| RowsBench         | bench_diff_right_1k_on_10k | 2    | 3   | 97.148mb +0.00%  | 18.345ms +0.54%  | ±0.59% +70.18%  |
| RowsBench         | bench_drop_1k_on_10k       | 2    | 3   | 97.946mb +0.00%  | 1.743ms +25.98%  | ±0.47% -76.82%  |
| RowsBench         | bench_drop_right_1k_on_10k | 2    | 3   | 97.946mb +0.00%  | 1.910ms +39.46%  | ±0.46% -48.28%  |
| RowsBench         | bench_entries_on_10k       | 2    | 3   | 96.107mb +0.00%  | 5.017ms +30.94%  | ±3.49% +286.64% |
| RowsBench         | bench_filter_on_10k        | 2    | 3   | 96.636mb +0.00%  | 16.408ms +2.02%  | ±2.66% +139.05% |
| RowsBench         | bench_find_on_10k          | 2    | 3   | 96.636mb +0.00%  | 16.417ms +2.39%  | ±0.84% +48.68%  |
| RowsBench         | bench_find_one_on_10k      | 10   | 3   | 95.328mb +0.00%  | 1.894μs +5.57%   | ±2.53% -5.36%   |
| RowsBench         | bench_first_on_10k         | 10   | 3   | 95.328mb +0.00%  | 0.400μs 0.00%    | ±0.00% 0.00%    |
| RowsBench         | bench_flat_map_on_1k       | 2    | 3   | 104.546mb +0.00% | 15.381ms +5.28%  | ±1.45% -27.49%  |
| RowsBench         | bench_map_on_10k           | 2    | 3   | 134.613mb +0.00% | 72.768ms +4.58%  | ±0.68% -52.10%  |
| RowsBench         | bench_merge_1k_on_10k      | 2    | 3   | 97.156mb +0.00%  | 1.598ms +30.74%  | ±2.62% +30.57%  |
| RowsBench         | bench_partition_by_on_10k  | 2    | 3   | 100.527mb +0.00% | 62.391ms +1.68%  | ±0.09% -56.67%  |
| RowsBench         | bench_remove_on_10k        | 2    | 3   | 98.209mb +0.00%  | 4.093ms +13.31%  | ±2.39% +531.59% |
| RowsBench         | bench_sort_asc_on_1k       | 2    | 3   | 95.690mb +0.00%  | 40.695ms +1.83%  | ±0.82% +13.86%  |
| RowsBench         | bench_sort_by_on_1k        | 2    | 3   | 95.690mb +0.00%  | 40.850ms +0.88%  | ±3.53% +69.48%  |
| RowsBench         | bench_sort_desc_on_1k      | 2    | 3   | 95.690mb +0.00%  | 40.465ms +1.07%  | ±0.84% +74.33%  |
| RowsBench         | bench_sort_entries_on_1k   | 2    | 3   | 97.768mb +0.00%  | 8.389ms +2.69%   | ±1.51% +90.97%  |
| RowsBench         | bench_sort_on_1k           | 2    | 3   | 95.518mb +0.00%  | 30.134ms +3.07%  | ±0.45% -72.75%  |
| RowsBench         | bench_take_1k_on_10k       | 10   | 3   | 95.328mb +0.00%  | 13.960μs +4.88%  | ±2.41% -27.44%  |
| RowsBench         | bench_take_right_1k_on_10k | 10   | 3   | 95.328mb +0.00%  | 17.260μs +12.13% | ±3.00% +877.74% |
| RowsBench         | bench_unique_on_1k         | 2    | 3   | 114.429mb +0.00% | 186.961ms -2.57% | ±1.93% +169.21% |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 105.518mb +0.00% | 727.460ms +0.98% | ±0.89% +57.44%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.028mb +0.00%  | 365.430ms -0.69% | ±0.49% -72.12%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.806mb +0.01%  | 77.362ms -0.22%  | ±0.50% -54.75%  |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+

@codecov
Copy link

codecov bot commented May 8, 2025

Codecov Report

Attention: Patch coverage is 72.50000% with 11 lines in your changes missing coverage. Please review.

Project coverage is 83.28%. Comparing base (5111751) to head (32b2c1e).
Report is 4 commits behind head on 1.x.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x    #1640      +/-   ##
==========================================
+ Coverage   83.18%   83.28%   +0.10%     
==========================================
  Files         706      707       +1     
  Lines       19103    19137      +34     
==========================================
+ Hits        15890    15939      +49     
+ Misses       3213     3198      -15     
Components Coverage Δ
etl 86.37% <71.79%> (+0.23%) ⬆️
cli 84.59% <ø> (ø)
lib-array-dot 94.53% <ø> (ø)
lib-azure-sdk 62.56% <ø> (ø)
lib-doctrine-dbal-bulk 90.11% <ø> (ø)
lib-filesystem 78.02% <ø> (ø)
lib-parquet 84.36% <ø> (ø)
lib-parquet-viewer 82.02% <ø> (ø)
lib-snappy 91.16% <ø> (ø)
bridge-filesystem-async-aws 90.38% <ø> (ø)
bridge-filesystem-azure 89.92% <ø> (ø)
bridge-monolog-http 96.38% <ø> (ø)
symfony-http-foundation 74.41% <ø> (ø)
adapter-chartjs 86.45% <ø> (ø)
adapter-csv 89.57% <ø> (ø)
adapter-doctrine 89.73% <ø> (ø)
adapter-elasticsearch 97.19% <ø> (ø)
adapter-google-sheet 80.00% <ø> (ø)
adapter-http 59.15% <ø> (ø)
adapter-json 90.62% <ø> (ø)
adapter-logger 53.84% <ø> (ø)
adapter-meilisearch 97.75% <ø> (ø)
adapter-parquet 80.85% <ø> (ø)
adapter-text 84.44% <ø> (ø)
adapter-xml 83.20% <100.00%> (+0.04%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@norberttech norberttech merged commit a4c8005 into 1.x May 8, 2025
22 of 23 checks passed
@norberttech norberttech deleted the 1637-batchsizeoptimization branch May 8, 2025 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BatchSizeOptimization

2 participants