You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Python] pyarrow.parquet.read_* should use pre_buffer=True #28218
If the user is synchronously reading a single file, we should try to read it as fast as possible. The one sticking point might be whether it's beneficial to enable this no matter the filesystem or whether we should try to only enable it on high-latency filesystems.
Joris Van den Bossche / @jorisvandenbossche: @lidavidm small comment on the benchmark code: for the pyarrow cases, you need to add a .to_pandas() call for it to be equivalent with the pandas pd.read_parquet version (although I would expect this not be that significant compared to reading from S3).
(the read_pandas is a bit confusing name, but it still reads into a pyarrow.Table, it only uses the pandas metadata by default to eg ensure to read the pandas index column as well)
Activity
asfimport commentedon Apr 16, 2021
David Li / @lidavidm:
Here's a quick comparison between Pandas/S3FS and PyArrow with a pre_buffer option implemented:
asfimport commentedon Apr 16, 2021
David Li / @lidavidm:
And for local files, to confirm that pre_buffer isn't a negative:
This is on a system with NVME storage, so results may vary for spinning-rust or SATA SSDs.
(Updated results to read once without measuring before taking the measurement, in case disk cache is a factor)
asfimport commentedon Apr 16, 2021
David Li / @lidavidm:
Finally, if we perform column selection, fsspec's readahead is actually extremely detrimental:
asfimport commentedon Apr 19, 2021
Joris Van den Bossche / @jorisvandenbossche:
@lidavidm small comment on the benchmark code: for the pyarrow cases, you need to add a
.to_pandas()call for it to be equivalent with the pandas pd.read_parquet version (although I would expect this not be that significant compared to reading from S3).(the
read_pandasis a bit confusing name, but it still reads into a pyarrow.Table, it only uses the pandas metadata by default to eg ensure to read the pandas index column as well)asfimport commentedon Apr 19, 2021
David Li / @lidavidm:
D'oh, and you already explained this in the SO question :) I'll re-run the benchmarks to make sure they're fair.
asfimport commentedon Apr 19, 2021
David Li / @lidavidm:
asfimport commentedon May 5, 2021
Joris Van den Bossche / @jorisvandenbossche:
Issue resolved by pull request 10074
#10074