You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "haixuanTao (via GitHub)" <gi...@apache.org> on 2023/04/10 04:49:36 UTC

[GitHub] [arrow] haixuanTao opened a new issue, #34994: Creating first pyarrow is slow.

haixuanTao opened a new issue, #34994:
URL: https://github.com/apache/arrow/issues/34994

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   On my machine creating the first arrow array is unexpectedly slow.
   
   ## To reproduce
   
   ```bash
   python3 -c "import pyarrow as pa; import time; t_send = time.perf_counter(); b = pa.array([200]); print(f'send time={(time.perf_counter() - t_send) * 1_000_000}')"
   ```
   result (in ns):
   ```bash
   send time=188282.6280016161 
   ```
   
   This is equal to 200ms. 
   
   While:
   
   ```bash
   python3 -c "import pyarrow as pa; import time; pa.array([200]); t_send = time.perf_counter(); b = pa.array([200]); print(f'send time={(time.perf_counter() - t_send) * 1_000_000}')"
   ``` 
   result (in ns):
   ```bash
   send time=19.691000488819554
   ```
   
   ## Expected behaviour
   
   Not sure why this warmup is required but can we have this warmup within the `__init__` of arrow.
   
   ## Version
   
   ```
   Name: pyarrow
   Version: 11.0.0
   ```
   
   ```
   Python 3.10.8
   ```
   
   ### Component(s)
   
   Python


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org