Skip to content

Commit

Permalink
reduce rows lru cache (#1864)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq authored Sep 26, 2023
1 parent 7654067 commit f300570
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/libcommon/src/libcommon/parquet_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def _init_parquet_index(
)

# note that this cache size is global for the class, not per instance
@lru_cache(maxsize=8)
@lru_cache(maxsize=1)
def query(self, offset: int, length: int) -> pa.Table:
"""Query the parquet files
Expand Down Expand Up @@ -351,7 +351,7 @@ def __init__(
self.unsupported_features = unsupported_features
self.all_columns_supported_datasets_allow_list = all_columns_supported_datasets_allow_list

@lru_cache(maxsize=8)
@lru_cache(maxsize=1)
def get_rows_index(
self,
dataset: str,
Expand Down

0 comments on commit f300570

Please sign in to comment.