Skip to content

Remove part of unnecessary recursion calls from array_dot_get() method#2157

Merged
norberttech merged 1 commit intoflow-php:1.xfrom
stloyd:feature/2156
Jan 19, 2026
Merged

Remove part of unnecessary recursion calls from array_dot_get() method#2157
norberttech merged 1 commit intoflow-php:1.xfrom
stloyd:feature/2156

Conversation

@stloyd
Copy link
Member

@stloyd stloyd commented Jan 19, 2026

Resolves: #2156

Cleaner to review without whitespace visible.

Change Log


Added

Fixed

Changed

  • Remove part of unnecessary recursion calls from `array_dot_get()` method

Removed

Deprecated

Security

@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          |
+--------------------------+-------------------------------+------+-----+-----------------+------------------+-----------------+
| CSVExtractorBench        | bench_extract_1k              | 1    | 3   | 5.960mb +0.00%  | 40.516ms +1.78%  | ±3.06% +307.30% |
| DbalExtractorBench       | bench_extract_1k_keyset       | 1    | 3   | 15.476mb -0.06% | 27.850ms +4.94%  | ±1.77% -0.20%   |
| DbalExtractorBench       | bench_extract_1k_limit_offset | 1    | 3   | 15.465mb -0.01% | 23.752ms +2.23%  | ±3.53% +4.97%   |
| ExcelExtractorBench      | bench_extract_1k_ods          | 1    | 3   | 8.292mb +0.00%  | 141.174ms +2.91% | ±2.64% +31.31%  |
| ExcelExtractorBench      | bench_extract_1k_xlsx         | 1    | 3   | 8.384mb +0.00%  | 188.112ms +5.73% | ±2.70% +391.04% |
| JsonExtractorBench       | bench_extract_1k              | 1    | 3   | 5.960mb +0.00%  | 44.781ms +7.70%  | ±1.20% -49.36%  |
| ParquetExtractorBench    | bench_extract_1k              | 1    | 3   | 5.960mb +0.00%  | 106.740ms -6.93% | ±1.70% +95.98%  |
| PostgreSqlExtractorBench | bench_extract_1k_cursor       | 1    | 3   | 16.289mb +0.02% | 54.749ms +18.62% | ±2.55% -30.72%  |
| PostgreSqlExtractorBench | bench_extract_1k_keyset       | 1    | 3   | 16.296mb +0.04% | 75.697ms -6.82%  | ±2.95% -18.11%  |
| PostgreSqlExtractorBench | bench_extract_1k_limit_offset | 1    | 3   | 16.308mb -0.04% | 77.914ms +4.83%  | ±1.41% -15.91%  |
| TextExtractorBench       | bench_extract_1k              | 1    | 3   | 5.960mb +0.00%  | 5.489ms -1.87%   | ±3.53% +117.02% |
| XmlExtractorBench        | bench_extract_1k              | 1    | 3   | 5.960mb +0.00%  | 88.658ms -1.10%  | ±2.22% -13.34%  |
+--------------------------+-------------------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+---------------------------------+-------------------------+------+-----+----------------+-----------------+----------------+
| benchmark                       | subject                 | revs | its | mem_peak       | mode            | rstdev         |
+---------------------------------+-------------------------+------+-----+----------------+-----------------+----------------+
| RenameEntryTransformerBench     | bench_transform_1k_rows | 1    | 3   | 5.960mb +0.00% | 1.340ms -4.75%  | ±2.02% -35.05% |
| RenameEachEntryTransformerBench | bench_transform_1k_rows | 1    | 3   | 5.960mb +0.00% | 16.052ms +2.92% | ±2.38% -15.02% |
+---------------------------------+-------------------------+------+-----+----------------+-----------------+----------------+
Loaders
+-----------------------+--------------------+------+-----+-----------------+------------------+-----------------+
| benchmark             | subject            | revs | its | mem_peak        | mode             | rstdev          |
+-----------------------+--------------------+------+-----+-----------------+------------------+-----------------+
| CSVLoaderBench        | bench_load_1k      | 1    | 3   | 9.921mb -0.06%  | 11.124ms +0.16%  | ±2.45% +60.22%  |
| DbalLoaderBench       | bench_load_1k      | 1    | 3   | 15.428mb -0.06% | 55.647ms -0.19%  | ±2.55% +8.44%   |
| ExcelLoaderBench      | bench_load_1k_ods  | 1    | 3   | 10.058mb -0.04% | 26.983ms +6.30%  | ±2.64% +86.95%  |
| ExcelLoaderBench      | bench_load_1k_xlsx | 1    | 3   | 10.127mb -0.02% | 28.124ms +10.41% | ±3.22% +867.68% |
| JsonLoaderBench       | bench_load_1k      | 1    | 3   | 9.908mb +0.16%  | 9.625ms -4.22%   | ±3.47% +16.72%  |
| ParquetLoaderBench    | bench_load_1k      | 1    | 3   | 14.374mb -0.01% | 158.421ms -9.53% | ±3.06% +455.88% |
| PostgreSqlLoaderBench | bench_load_1k      | 1    | 3   | 16.262mb +0.02% | 47.863ms -4.75%  | ±3.48% +23.24%  |
| TextLoaderBench       | bench_load_1k      | 1    | 3   | 10.116mb -0.16% | 2.706ms -15.11%  | ±3.24% +47.47%  |
+-----------------------+--------------------+------+-----+-----------------+------------------+-----------------+
Building Blocks
+-------------------+-----------------------------------+------+-----+-----------------+-------------------+-----------------+
| benchmark         | subject                           | revs | its | mem_peak        | mode              | rstdev          |
+-------------------+-----------------------------------+------+-----+-----------------+-------------------+-----------------+
| RowsBench         | bench_chunk_100_on_1k             | 1    | 3   | 10.960mb +0.02% | 25.000μs -0.24%   | ±0.00% -100.00% |
| RowsBench         | bench_diff_left_10_on_100         | 1    | 3   | 11.029mb +0.00% | 729.284μs -18.12% | ±2.96% +188.60% |
| RowsBench         | bench_diff_right_10_on_100        | 1    | 3   | 11.022mb +0.12% | 802.556μs -0.40%  | ±3.05% +5.54%   |
| RowsBench         | bench_drop_10_on_100              | 1    | 3   | 10.935mb +0.11% | 2.000μs -33.33%   | ±0.00% 0.00%    |
| RowsBench         | bench_drop_right_10_on_100        | 1    | 3   | 10.936mb -0.07% | 3.000μs 0.00%     | ±0.00% 0.00%    |
| RowsBench         | bench_entries_on_100              | 1    | 3   | 10.940mb -0.06% | 29.939μs -0.40%   | ±1.59% +2.25%   |
| RowsBench         | bench_filter_on_100               | 1    | 3   | 10.941mb -0.13% | 326.233μs -2.54%  | ±3.02% -15.56%  |
| RowsBench         | bench_find_on_100                 | 1    | 3   | 10.944mb -0.00% | 311.483μs -5.02%  | ±1.97% -45.21%  |
| RowsBench         | bench_find_one_on_100             | 1    | 3   | 10.937mb +0.04% | 300.495μs -7.94%  | ±2.13% -7.25%   |
| RowsBench         | bench_first_on_100                | 1    | 3   | 10.937mb +0.05% | 0.000μs 0.00%     | ±0.00% 0.00%    |
| RowsBench         | bench_merge_10_on_100             | 1    | 3   | 10.937mb +0.05% | 3.000μs 0.00%     | ±0.00% 0.00%    |
| RowsBench         | bench_partition_by_on_100         | 1    | 3   | 11.037mb -0.00% | 162.168μs +10.17% | ±1.34% +15.52%  |
| RowsBench         | bench_schema_on_1k_identical_rows | 1    | 3   | 11.691mb -0.04% | 2.000μs +100.00%  | ±0.00% 0.00%    |
| RowsBench         | bench_sort_asc_on_100             | 1    | 3   | 10.955mb -0.12% | 252.573μs -1.85%  | ±3.80% +374.09% |
| RowsBench         | bench_sort_by_on_100              | 1    | 3   | 10.946mb +0.02% | 234.096μs -5.14%  | ±2.27% -19.54%  |
| RowsBench         | bench_sort_desc_on_100            | 1    | 3   | 10.945mb -0.02% | 261.597μs +8.92%  | ±1.29% +42.82%  |
| RowsBench         | bench_sort_entries_on_100         | 1    | 3   | 11.004mb +0.04% | 692.055μs -7.05%  | ±1.10% -58.87%  |
| RowsBench         | bench_unique_on_100               | 1    | 3   | 11.021mb +0.03% | 3.856ms +4.01%    | ±2.06% -48.14%  |
| EntryFactoryBench | bench_entry_factory               | 1    | 3   | 14.162mb +0.01% | 62.489ms +5.96%   | ±1.37% -26.12%  |
| EntryFactoryBench | bench_entry_factory               | 1    | 3   | 6.191mb +0.00%  | 7.885ms +3.35%    | ±3.17% +71.84%  |
| TypeDetectorBench | bench_type_detector               | 1    | 3   | 6.191mb +0.00%  | 6.656ms +0.90%    | ±2.66% -0.51%   |
+-------------------+-----------------------------------+------+-----+-----------------+-------------------+-----------------+
Parquet Library
+--------------------+---------------------------------+------+-----+----------------+------------------+-----------------+
| benchmark          | subject                         | revs | its | mem_peak       | mode             | rstdev          |
+--------------------+---------------------------------+------+-----+----------------+------------------+-----------------+
| ParquetReaderBench | bench_page_headers              | 1    | 3   | 5.960mb +0.00% | 2.873ms -2.31%   | ±0.93% -39.81%  |
| ParquetReaderBench | bench_read_metadata             | 1    | 3   | 5.960mb +0.00% | 1.000μs 0.00%    | ±0.00% 0.00%    |
| ParquetReaderBench | bench_read_schema               | 1    | 3   | 5.960mb +0.00% | 1.000μs -50.00%  | ±0.00% 0.00%    |
| ParquetReaderBench | bench_read_values_all_columns   | 1    | 3   | 5.960mb +0.00% | 49.399ms +1.52%  | ±2.58% +98.22%  |
| ParquetReaderBench | bench_read_values_single_column | 1    | 3   | 5.960mb +0.00% | 2.128ms -0.60%   | ±3.56% +335.40% |
| ParquetReaderBench | bench_read_values_with_limit    | 1    | 3   | 5.960mb +0.00% | 11.345ms +4.69%  | ±3.12% -1.88%   |
| ParquetWriterBench | bench_write_batch               | 1    | 3   | 6.206mb +0.00% | 188.217ms -4.07% | ±1.73% +33.35%  |
| ParquetWriterBench | bench_write_gzip                | 1    | 3   | 6.461mb +0.00% | 214.616ms -1.62% | ±0.94% -55.55%  |
| ParquetWriterBench | bench_write_row_by_row          | 1    | 3   | 6.206mb +0.00% | 191.070ms +0.09% | ±2.34% +17.96%  |
| ParquetWriterBench | bench_write_snappy              | 1    | 3   | 6.206mb +0.00% | 214.701ms +7.40% | ±3.47% +25.83%  |
| ParquetWriterBench | bench_write_uncompressed        | 1    | 3   | 6.206mb +0.00% | 192.214ms +0.83% | ±2.21% +81.90%  |
+--------------------+---------------------------------+------+-----+----------------+------------------+-----------------+

@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.85%. Comparing base (56febe0) to head (1a63f37).
⚠️ Report is 2 commits behind head on 1.x.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x    #2157      +/-   ##
==========================================
+ Coverage   83.62%   83.85%   +0.22%     
==========================================
  Files        1269     1269              
  Lines       45476    45470       -6     
==========================================
+ Hits        38031    38130      +99     
+ Misses       7445     7340     -105     
Components Coverage Δ
etl 90.54% <ø> (+0.89%) ⬆️
cli 85.76% <ø> (ø)
lib-array-dot 94.82% <100.00%> (-0.18%) ⬇️
lib-azure-sdk 60.01% <ø> (ø)
lib-doctrine-dbal-bulk 95.16% <ø> (ø)
lib-filesystem 80.44% <ø> (ø)
lib-types 88.98% <ø> (+1.51%) ⬆️
lib-parquet 68.25% <ø> (ø)
lib-parquet-viewer 83.04% <ø> (ø)
lib-snappy 90.18% <ø> (ø)
bridge-filesystem-async-aws 90.95% <ø> (ø)
bridge-filesystem-azure 89.38% <ø> (ø)
bridge-monolog-http 96.89% <ø> (ø)
bridge-openapi-specification 91.50% <ø> (ø)
symfony-http-foundation 74.11% <ø> (ø)
adapter-chartjs 86.33% <ø> (ø)
adapter-csv 89.30% <ø> (ø)
adapter-doctrine 92.00% <ø> (ø)
adapter-elasticsearch 97.02% <ø> (ø)
adapter-google-sheet 97.05% <ø> (ø)
adapter-http 65.94% <ø> (ø)
adapter-json 89.69% <ø> (ø)
adapter-logger 83.33% <ø> (ø)
adapter-meilisearch 97.77% <ø> (ø)
adapter-parquet 79.92% <ø> (ø)
adapter-text 86.84% <ø> (ø)
adapter-xml 82.66% <ø> (ø)
🚀 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 81cda59 into flow-php:1.x Jan 19, 2026
22 of 23 checks passed
@stloyd stloyd deleted the feature/2156 branch January 19, 2026 10:05
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.

[Bug]: array_dot_get does a lot of internal recursions

2 participants