Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-42064: Optimisesqlite3 state access, part 1#27273

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@erlend-aasland
Copy link
Contributor

@erlend-aaslanderlend-aasland commentedJul 20, 2021
edited by miss-islington
Loading

Prepare for module state:

  • Add "get state by defining class" and "get state by module def" stubs
  • Add AC defining class when needed
  • Add state pointer to connection context
  • Pass state as argument to utility functions

https://bugs.python.org/issue42064

Automerge-Triggered-By: GH:encukou

@encukou
Copy link
Member

Have you thought about caching the state on Connection objects? That way you could get the state from a cursor by following two pointers. (And similarly for other cases where you have a Connection, which is most of pysqlite).
Connections are already quite heavy, so adding one more pointer might be a good trade-off.

pysqlite_get_state_by_cls looks like it'll eventually use_PyType_GetModuleByDef, which isn't as fast as following two pointers.

erlend-aasland reacted with thumbs up emoji

@erlend-aasland
Copy link
ContributorAuthor

erlend-aasland commentedJul 27, 2021
edited
Loading

Have you thought about caching the state on Connection objects? That way you could get the state from a cursor by following two pointers. (And similarly for other cases where you have a Connection, which is most of pysqlite).
Connections are already quite heavy, so adding one more pointer might be a good trade-off.

Yes, I have though about it, but I don't remember why I didn't follow that idea :) As you say, it's probably a very good trade-off. I'll have a go at it.

pysqlite_get_state_by_cls looks like it'll eventually use_PyType_GetModuleByDef, which isn't as fast as following two pointers.

Both true. No, it was meant to usePyType_GetModuleState.

@erlend-aaslanderlend-aasland marked this pull request as draftJuly 27, 2021 21:29
@erlend-aaslanderlend-aasland marked this pull request as ready for reviewJuly 27, 2021 23:41
@erlend-aasland
Copy link
ContributorAuthor

PTAL!

@encukou
Copy link
Member

Looks good, I just did a trivial merge to resolve a conflict.

erlend-aasland reacted with hooray emoji

@miss-islington
Copy link
Contributor

@erlend-aasland: Status check is done, and it's a success ✅ .

@miss-islingtonmiss-islington merged commitd542742 intopython:mainJul 29, 2021
@erlend-aasland
Copy link
ContributorAuthor

Looks good, I just did a trivial merge to resolve a conflict.

Great, thanks and thank you for reviewing.

@erlend-aaslanderlend-aasland deleted the sqlite-ac-defining-class branchJuly 29, 2021 09:52
erlend-aasland pushed a commit to erlend-aasland/cpython that referenced this pull requestJul 29, 2021
erlend-aasland pushed a commit to erlend-aasland/cpython that referenced this pull requestJul 29, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@encukouencukouencukou approved these changes

@berkerpeksagberkerpeksagAwaiting requested review from berkerpeksagberkerpeksag is a code owner

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@erlend-aasland@encukou@miss-islington@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2026 Movatter.jp