-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: plotly/plotly.py
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.5.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: plotly/plotly.py
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 18 commits
- 8 files changed
- 9 contributors
Commits on Oct 30, 2025
-
The optimization achieves a **58x speedup** by eliminating the major performance bottleneck in pandas DataFrame processing. **Key optimizations:** 1. **Pre-fetch column data as numpy arrays**: The original code used `df.iloc[index][key]` for each cell access, which triggers pandas' slow row-based indexing mechanism. The optimized version extracts all column data upfront using `df[key].values` and stores it in a dictionary, then uses direct numpy array indexing `columns[key][index]` inside the loop. 2. **More efficient key validation**: Replaced the nested loop checking for missing keys with a single list comprehension `missing_keys = [key for key in REQUIRED_GANTT_KEYS if key not in df]`. 3. **Use actual DataFrame columns**: Instead of iterating over the DataFrame object itself (which includes metadata), the code now uses `list(df.columns)` to get only the actual column names. **Why this is dramatically faster:** - `df.iloc[index][key]` creates temporary pandas Series objects and involves complex indexing logic for each cell - Direct numpy array indexing `columns[key][index]` is orders of magnitude faster - The line profiler shows the original `df.iloc` line consumed 96.8% of execution time (523ms), while the optimized dictionary comprehension takes only 44.9% (4.2ms) **Performance characteristics:** - **Large DataFrames see massive gains**: 8000%+ speedup on 1000-row DataFrames - **Small DataFrames**: 40-50% faster - **List inputs**: Slight slowdown (3-13%) due to additional validation overhead, but still microsecond-level performance - **Empty DataFrames**: Some slowdown due to upfront column extraction, but still fast overall This optimization is most beneficial for DataFrame inputs with many rows, where the repeated `iloc` calls created a severe performance bottleneck.
Configuration menu - View commit details
-
Copy full SHA for 688fe67 - Browse repository at this point
Copy the full SHA 688fe67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6be6284 - Browse repository at this point
Copy the full SHA 6be6284View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e2a2f0 - Browse repository at this point
Copy the full SHA 9e2a2f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ddb02b - Browse repository at this point
Copy the full SHA 7ddb02bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 666dcc2 - Browse repository at this point
Copy the full SHA 666dcc2View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef98a70 - Browse repository at this point
Copy the full SHA ef98a70View commit details
Commits on Nov 17, 2025
-
Configuration menu - View commit details
-
Copy full SHA for aa797c5 - Browse repository at this point
Copy the full SHA aa797c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3458474 - Browse repository at this point
Copy the full SHA 3458474View commit details
Commits on Nov 18, 2025
-
Merge pull request #5423 from plotly/update-plotly-version
Update plotly.py version for docs
Configuration menu - View commit details
-
Copy full SHA for 043ff90 - Browse repository at this point
Copy the full SHA 043ff90View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e84b4a - Browse repository at this point
Copy the full SHA 0e84b4aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c5dcd1 - Browse repository at this point
Copy the full SHA 4c5dcd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 084595a - Browse repository at this point
Copy the full SHA 084595aView commit details -
Configuration menu - View commit details
-
Copy full SHA for df67ffb - Browse repository at this point
Copy the full SHA df67ffbView commit details
Commits on Nov 19, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 3dde3b6 - Browse repository at this point
Copy the full SHA 3dde3b6View commit details -
Co-authored-by: Cameron DeCoster <cameron.decoster@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 79fe9f4 - Browse repository at this point
Copy the full SHA 79fe9f4View commit details -
Merge pull request #5386 from codeflash-ai/codeflash/optimize-validat…
…e_gantt-mhcxyu68 ⚡️ Speed up function `validate_gantt` by 58x
Configuration menu - View commit details
-
Copy full SHA for f083977 - Browse repository at this point
Copy the full SHA f083977View commit details
Commits on Dec 3, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 2f1008f - Browse repository at this point
Copy the full SHA 2f1008fView commit details -
Merge pull request #5441 from plotly/cam/5440/update-github-issue-tem…
…plates fix: Update GitHub issue templates
Configuration menu - View commit details
-
Copy full SHA for 509d1fc - Browse repository at this point
Copy the full SHA 509d1fcView commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v6.5.0...main