8000 Use CFFI's out-of-line mode for import time reductions on Windows by A5rocks · Pull Request #3263 · python-trio/trio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use CFFI's out-of-line mode for import time reductions on Windows #3263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

A5rocks
Copy link
Contributor
@A5rocks A5rocks commented May 12, 2025

Turns out parsing C takes time! Relevant charts (from before this):

image

image

(x axis is import time in microseconds, excluding anything that module itself imports)

I know there's conflicts but I'll wait until CI is fixed anyways.

Copy link
codecov bot commented May 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00000%. Comparing base (56275c1) to head (d3fc827).

Additional details and impacted files
@@               Coverage Diff               @@
##                 main        #3263   +/-   ##
===============================================
  Coverage   100.00000%   100.00000%           
===============================================
  Files             127          127           
  Lines           19259        19255    -4     
  Branches         1301         1302    +1     
===============================================
- Hits            19259        19255    -4     
Files with missing lines Coverage Δ
src/trio/_core/_io_windows.py 100.00000% <ø> (ø)
src/trio/_core/_tests/test_windows.py 100.00000% <100.00000%> (ø)
src/trio/_core/_windows_cffi.py 100.00000% <100.00000%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jakkdl
Copy link
Member
jakkdl commented May 12, 2025

maybe add typing-only hints to avoid breaking typing for end users?

@A5rocks
Copy link
Contributor Author
A5rocks commented May 13, 2025

This shouldn't break any typing for end users because it's unexported, but also the reason there's type ignores is because typeshed's stubs are wrong.

@A5rocks
Copy link
Contributor Author
A5rocks commented May 15, 2025

I don't quite get why mypy is failing in CI since I can't repro that locally. Maybe I need to make my environment more similar?

@jakkdl
Copy link
Member
jakkdl commented May 16, 2025

I don't quite get why mypy is failing in CI since I can't repro that locally. Maybe I need to make my environment more similar?

have you tried tox -e typing? (I repro the error when I do)

@A5rocks
Copy link
Contributor Author
A5rocks commented May 17, 2025

Turns out that's the difference between an editable and non-editable install! Scary.

@jakkdl
Copy link
Member
jakkdl commented May 19, 2025

ah, yeah editable installs can confuse static analysis. I remember having a lot of problems with pyright --verifytypes caused by it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0