GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Move compiled regular expressions in platform.py into cached methods · Issue #103977 · python/cpython

Move compiled regular expressions in platform.py into cached methods #103977

New issue
Copy link
New issue
Copy link
Closed
Closed
Move compiled regular expressions in platform.py into cached methods#103977
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@eendebakpt
eendebakpt
opened on Apr 28, 2023
Issue body actions

In platform.py there are several regular expressions compiled during import that might not be used at all. The regular expressions are only called once at most, since they are called from without cached metods. We can eliminate the cost of compilation by moving the regular expressions into the methods.

Linked PRs

  • gh-103977: compile re expressions in platform.py only if required #103981
Reacted by Tian Gao, Ken Jin and Kirill Podoprigora

Activity

  1. eendebakpt
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Apr 28, 2023
  2. JelleZijlstra
    added a commit that references this issue on Apr 30, 2023

    gh-103977: compile re expressions in platform.py only if required (#1…

    f186557
  3. JelleZijlstra commented on Apr 30, 2023

    @JelleZijlstra
    JelleZijlstra
    on Apr 30, 2023
    Member
    More actions

    Thanks for the PR!

  4. JelleZijlstra
    closed this as completedon Apr 30, 2023
  5. carljm
    added a commit that references this issue on May 1, 2023

    Merge branch 'main' into supermon

    159b2aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.