Skip to content

Conversation

@norberttech
Copy link
Member

Change Log

Added

Fixed

Changed

Removed

  • Loaders are no longer allowing for setting chunk size

Deprecated

Security


Closes: #717

Description

Just like with Extractors, chunk size should now be controller through DataFrame::chunkSize(int $size) method.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2023

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          |
+-----------------------+-------------------+------+-----+------------------+-------------------+-----------------+
| AvroExtractorBench    | bench_extract_10k | 1    | 3   | 35.131mb +0.00%  | 351.089ms -20.23% | ±0.50% -45.12%  |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.789mb +0.00%   | 269.985ms -20.83% | ±1.05% +254.44% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.937mb +0.00%   | 569.690ms -11.98% | ±1.59% +898.01% |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 233.497mb +0.00% | 774.018ms -16.64% | ±1.43% +286.64% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.783mb +0.00%   | 19.348ms -21.68%  | ±1.28% +59.42%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.783mb +0.00%   | 402.432ms -23.09% | ±0.34% -21.27%  |
+-----------------------+-------------------+------+-----+------------------+-------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+-----------------+------------------+-----------------+
| benchmark                   | subject                  | revs | its | mem_peak        | mode             | rstdev          |
+-----------------------------+--------------------------+------+-----+-----------------+------------------+-----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 87.050mb +0.00% | 48.485ms -20.79% | ±0.70% +392.66% |
+-----------------------------+--------------------------+------+-----+-----------------+------------------+-----------------+
Loaders
+--------------------+----------------+------+-----+------------------+-------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode              | rstdev          |
+--------------------+----------------+------+-----+------------------+-------------------+-----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 93.290mb +0.00%  | 568.896ms -13.42% | ±0.63% +163.10% |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 46.066mb +0.00%  | 67.573ms -3.00%   | ±0.69% -18.59%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 88.568mb +0.00%  | 60.202ms -10.96%  | ±0.54% +32.85%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 284.009mb +0.00% | 1.158s -18.14%    | ±0.81% +114.88% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 16.560mb +0.00%  | 39.218ms +11.31%  | ±0.33% -76.04%  |
+--------------------+----------------+------+-----+------------------+-------------------+-----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+-----------------+-------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak        | mode              | rstdev          |
+-------------------------+----------------------------+------+-----+-----------------+-------------------+-----------------+
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 60.659mb +0.00% | 2.227ms -30.16%   | ±1.87% +810.21% |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 80.451mb +0.00% | 152.334ms -13.37% | ±0.45% +140.98% |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 58.977mb +0.00% | 15.387ms -13.60%  | ±1.15% +499.64% |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 59.798mb +0.00% | 1.675ms -36.15%   | ±1.72% +191.08% |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 59.798mb +0.00% | 1.687ms -35.88%   | ±0.49% -46.51%  |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 59.011mb +0.00% | 2.533ms -28.36%   | ±0.30% -59.90%  |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 59.540mb +0.00% | 13.771ms -19.65%  | ±0.69% +127.55% |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 59.540mb +0.00% | 13.817ms -18.97%  | ±1.10% +268.85% |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 57.611mb +0.00% | 1.794μs -18.23%   | ±2.67% +22.64%  |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 57.611mb +0.00% | 0.300μs -40.00%   | ±0.00% 0.00%    |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 65.844mb +0.00% | 10.329ms -23.63%  | ±1.13% -59.52%  |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 91.364mb +0.00% | 47.178ms -16.54%  | ±0.61% +145.69% |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 60.061mb +0.00% | 1.843ms -37.05%   | ±0.81% -42.68%  |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 62.331mb +0.00% | 32.328ms -18.71%  | ±0.29% +3.80%   |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 62.161mb +0.00% | 4.556ms -33.66%   | ±0.75% +187.89% |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 57.611mb +0.00% | 37.457ms -17.89%  | ±0.74% +327.77% |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 57.611mb +0.00% | 37.238ms -18.28%  | ±0.30% +744.37% |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 57.611mb +0.00% | 37.861ms -18.10%  | ±0.13% +34.89%  |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 59.885mb +0.00% | 7.312ms -25.62%   | ±1.53% +9.03%   |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 57.610mb +0.00% | 28.373ms -21.16%  | ±0.23% +15.00%  |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 57.611mb +0.00% | 12.960μs -37.69%  | ±2.59% +559.37% |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 57.611mb +0.00% | 15.394μs -41.28%  | ±0.31% -83.63%  |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 80.452mb +0.00% | 158.480ms -11.86% | ±0.70% +19.29%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 91.738mb -0.01% | 120.749ms -14.80% | ±0.34% +18.79%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 47.595mb -0.01% | 56.774ms -20.31%  | ±2.99% +415.85% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 12.387mb -0.01% | 13.481ms -22.27%  | ±0.92% +19.73%  |
+-------------------------+----------------------------+------+-----+-----------------+-------------------+-----------------+

@norberttech norberttech merged commit 02dea7d into flow-php:1.x Nov 5, 2023
@norberttech norberttech deleted the 717-remove-batchsize-from-loaders branch December 5, 2024 20:24
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.

Remove batchSize from loaders

1 participant