Skip to content

Conversation

@norberttech
Copy link
Member

Change Log

Added

Fixed

Changed

Removed

  • Serializable interface
  • laravel/serializable-closure dependency

Deprecated

Security


Description

Serializable interface was part of the attempt to let flow process datasets in parallel using subprocesse, the idea was to serialize whole pipeline and send it over TCP to subprocess.
It worked, however that type of parallel processing is not brining enough speed boost since the biggest bottleneck is usually reading from the source. Since AsyncPipeline was removed in 0.5.0, the Serializable interface also lost its purpose.

@github-actions
Copy link
Contributor

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.152mb -0.04%  | 758.051ms -1.68% | ±0.80% +52.88%  |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.800mb -0.53%   | 344.718ms -0.06% | ±0.43% -80.28%  |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.899mb -0.61%   | 980.057ms -1.32% | ±0.41% -70.27%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 239.604mb -0.01% | 1.149s +0.05%    | ±0.41% -25.12%  |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.666mb -0.26%   | 57.868ms +1.78%  | ±1.03% +202.93% |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.667mb -0.26%   | 466.311ms -1.09% | ±2.99% +196.41% |
+-----------------------+-------------------+------+-----+------------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev          |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 110.387mb -0.02% | 63.723ms +0.57% | ±0.47% +326.85% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 94.762mb -0.03%  | 444.405ms -1.67% | ±0.46% -50.34%  |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.840mb -0.05%  | 70.872ms -3.44%  | ±1.77% +475.92% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 105.356mb -0.03% | 54.874ms -4.18%  | ±1.24% -49.03%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 320.566mb -0.01% | 1.255s -0.06%    | ±0.41% -83.34%  |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.717mb -0.12%  | 40.137ms -2.09%  | ±0.94% +21.33%  |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+-------------------------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev                        |
+-------------------------+----------------------------+------+-----+------------------+------------------+-------------------------------+
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 116.014mb -0.02% | 382.076ms -2.25% | ±2.42% +208.11%               |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 59.732mb -0.04%  | 194.986ms -0.82% | ±0.98% -36.44%                |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.857mb -0.15%  | 41.645ms +1.04%  | ±2.12% +164.07%               |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 59.407mb -0.02%  | 324.089ms -3.01% | ±0.27% -76.90%                |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 14.330mb -0.07%  | 64.797ms -0.90%  | ±0.30% -44.40%                |
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 76.471mb -0.02%  | 3.834ms +0.47%   | ±1.23% -11.56%                |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 96.265mb -0.02%  | 183.389ms -4.44% | ±0.67% -61.52%                |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 74.791mb -0.02%  | 18.418ms -2.89%  | ±0.56% -8.04%                 |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 77.711mb -0.02%  | 1.616ms -4.19%   | ±1.82% +142.92%               |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 77.711mb -0.02%  | 1.612ms -5.19%   | ±1.12% +3.38%                 |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 74.823mb -0.02%  | 2.479ms -2.52%   | ±0.74% -74.20%                |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 75.352mb -0.02%  | 14.739ms -2.16%  | ±1.74% +104.41%               |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 75.352mb -0.02%  | 14.400ms -3.72%  | ±1.98% +404.63%               |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 73.255mb -0.02%  | 1.700μs -0.36%   | ±0.00% -100.00%               |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 73.255mb -0.02%  | 0.300μs 0.00%    | ±0.00% 0.00%                  |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 86.877mb -0.09%  | 12.579ms -3.65%  | ±2.33% +129.68%               |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 116.171mb -0.01% | 62.311ms -2.08%  | ±1.16% +72.79%                |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 75.872mb -0.02%  | 1.169ms -6.89%   | ±1.91% +62.59%                |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 79.222mb -0.02%  | 57.181ms -4.51%  | ±1.46% +409.52%               |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 77.973mb -0.02%  | 3.862ms +0.55%   | ±2.06% +311.49%               |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 73.402mb -0.02%  | 40.815ms -1.60%  | ±1.67% +28.90%                |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 73.402mb -0.02%  | 41.104ms -2.78%  | ±0.81% -28.86%                |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 73.402mb -0.02%  | 40.893ms -2.20%  | ±0.36% -55.51%                |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 75.697mb -0.02%  | 7.426ms +0.54%   | ±0.51% +63.84%                |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 73.255mb -0.02%  | 28.959ms -1.70%  | ±0.38% -44.34%                |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 73.255mb -0.02%  | 13.670μs +2.78%  | ±1.74% +13040084243318000.00% |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 73.255mb -0.02%  | 15.894μs -1.21%  | ±0.30% -49.47%                |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 96.267mb -0.02%  | 185.543ms -4.48% | ±0.68% -17.95%                |
+-------------------------+----------------------------+------+-----+------------------+------------------+-------------------------------+

@norberttech norberttech merged commit bae711f into flow-php:1.x Dec 31, 2023
@norberttech norberttech deleted the remove/serializable-interface branch December 5, 2024 20:23
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.

1 participant