Skip to content

Conversation

@stloyd
Copy link
Member

@stloyd stloyd commented Dec 30, 2023

Change Log

Added

Fixed

Changed

Removed

  • Remove compression serializer

Deprecated

Security


Description

The code was related to async code removed in #794 related to #793

@github-actions
Copy link
Contributor

github-actions bot commented Dec 30, 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.153mb +0.01%  | 764.666ms +1.02% | ±1.25% -12.12%  |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.806mb -0.14%   | 343.027ms +0.31% | ±0.30% -24.78%  |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.904mb -0.14%   | 980.962ms -0.84% | ±0.23% -45.10%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 239.610mb -0.00% | 1.141s +1.06%    | ±0.44% +2.77%   |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.673mb -0.15%   | 57.095ms +0.44%  | ±0.78% +279.39% |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.674mb -0.15%   | 470.366ms -0.85% | ±1.03% +26.97%  |
+-----------------------+-------------------+------+-----+------------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 110.396mb -0.01% | 63.345ms +1.25% | ±0.13% -82.53% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 94.768mb -0.01%  | 454.912ms -0.43% | ±1.43% +158.09% |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.846mb -0.01%  | 72.145ms -0.52%  | ±0.52% +1.01%   |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 105.428mb -0.07% | 56.768ms +0.33%  | ±0.89% +119.67% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 320.572mb -0.00% | 1.254s -1.22%    | ±1.00% +532.65% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.723mb -0.04%  | 41.315ms +0.08%  | ±0.46% -37.77%  |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 116.016mb -0.00% | 396.533ms +0.31% | ±0.24% -74.03%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 59.734mb -0.00%  | 200.252ms -0.85% | ±0.74% +124.68% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.859mb -0.00%  | 41.647ms +0.44%  | ±0.46% -29.98%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 59.407mb -0.00%  | 330.420ms -0.08% | ±0.37% -39.60%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 14.330mb -0.00%  | 65.552ms -1.43%  | ±0.89% +102.06% |
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 76.473mb -0.00%  | 3.801ms -7.45%   | ±0.94% -35.22%  |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 96.267mb -0.00%  | 188.385ms +1.29% | ±1.01% -29.01%  |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 74.793mb -0.00%  | 18.796ms +1.37%  | ±0.65% +105.61% |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 77.713mb -0.00%  | 1.622ms -5.75%   | ±0.15% -86.67%  |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 77.713mb -0.00%  | 1.649ms -6.17%   | ±0.93% -15.95%  |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 74.825mb -0.00%  | 2.445ms -6.13%   | ±1.76% +151.74% |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 75.354mb -0.00%  | 14.630ms -0.66%  | ±1.00% -19.71%  |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 75.354mb -0.00%  | 14.813ms -1.72%  | ±1.14% +185.84% |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 73.257mb -0.00%  | 1.800μs -4.96%   | ±0.00% -100.00% |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 73.257mb -0.00%  | 0.400μs 0.00%    | ±0.00% 0.00%    |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 86.879mb -0.00%  | 12.903ms -1.40%  | ±0.54% +25.32%  |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 116.239mb -0.00% | 64.093ms +0.54%  | ±0.28% +66.23%  |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 75.874mb -0.00%  | 1.206ms -8.10%   | ±1.15% -5.99%   |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 78.149mb -0.00%  | 37.303ms -0.40%  | ±2.45% +144.18% |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 77.975mb -0.00%  | 3.749ms -7.05%   | ±0.93% -17.99%  |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 73.404mb -0.00%  | 40.843ms +1.62%  | ±0.88% +380.42% |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 73.404mb -0.00%  | 40.427ms -0.67%  | ±0.68% +3.50%   |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 73.404mb -0.00%  | 40.703ms +1.17%  | ±0.21% -80.78%  |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 75.699mb -0.00%  | 7.428ms +0.20%   | ±0.30% -54.45%  |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 73.257mb -0.00%  | 29.304ms +1.09%  | ±0.95% -39.08%  |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 73.257mb -0.00%  | 13.383μs -3.02%  | ±1.60% +170.45% |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 73.257mb -0.00%  | 16.020μs -2.28%  | ±1.07% +270.36% |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 96.269mb -0.00%  | 190.055ms +0.37% | ±0.31% -54.24%  |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+

Copy link
Member

@norberttech norberttech left a comment

Choose a reason for hiding this comment

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

Serializable interface with all __serialize() and __unserialize methods should also be removed (maybe Rector can help to autome it).

But for the Cache I think I would still keep a thin abstraction for Serializer with native implementation that uses \serialize method.

Something like:

Serializer::serialize(object $object) : string
Serializer::unserialize(string $serialized, string $class) : object

@stloyd stloyd force-pushed the remove-custom-serializer branch from 1ce7718 to c74b334 Compare December 31, 2023 13:40
@github-actions github-actions bot added size: M and removed size: L labels Dec 31, 2023
@stloyd stloyd changed the title Remove custom serializer Remove compression serializer Dec 31, 2023
@stloyd stloyd force-pushed the remove-custom-serializer branch from c74b334 to fbbb5ad Compare December 31, 2023 13:41
@stloyd stloyd requested a review from norberttech December 31, 2023 13:47
@norberttech norberttech changed the title Remove compression serializer Adjust serializer interface Dec 31, 2023
@norberttech norberttech merged commit ad65513 into flow-php:1.x Dec 31, 2023
@stloyd stloyd deleted the remove-custom-serializer branch December 31, 2023 17:25
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.

2 participants