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 — Code run with cProfile performance regression in 3.11 · Issue #93381 · python/cpython

Code run with cProfile performance regression in 3.11 #93381

New issue
Copy link
New issue
Copy link
Closed
Closed
Code run with cProfile performance regression in 3.11#93381
Copy link
Labels
performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement

Description

@Fidget-Spinner
Fidget-Spinner
opened on May 31, 2022
Issue body actions

See this discussion on Discourse.

We could speed up cProfile a few ways. I'll try to work on a few PRs. We first need to find out why cProfile is so slow. I'm not sure if we can backport fixes. Though a 1.6x slowdown seems pretty significant.

Activity

  1. Fidget-Spinner
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on May 31, 2022
  2. hugovk
    added
    performancePerformance or resource usagePerformance or resource usage
    on May 31, 2022
  3. Fidget-Spinner commented on May 31, 2022

    @Fidget-Spinner
    Fidget-Spinner
    on May 31, 2022
    MemberAuthor
    More actions

    An update: I can reproduce the results that OP posted for his application. That is:

    3.10 with cProfile:
    Time Elapsed: 3.6727186999924015
    
    3.11 with cProfile:
    Time Elapsed: 6.189334200011217
    

    Without cProfile, there's a 10-20% speedup over 3.10.

    python main.py -n 500
    
    3.10 without cProfile:
    Time Elapsed: 15.240909200001624
    
    3.11 without cProfile:
    Time Elapsed: 12.682664599997224
    
  4. Fidget-Spinner
    changed the title [-]cProfile performance regression in 3.11[/-] [+]Code run with cProfile performance regression in 3.11[/+] on May 31, 2022
  5. Fidget-Spinner commented on May 31, 2022

    @Fidget-Spinner
    Fidget-Spinner
    on May 31, 2022
    MemberAuthor
    More actions

    Another update: between python 3.10 and 3.11, test_cprofile didn't slow down at all (in fact, it sped up slightly). That likely indicates that cprofile itself didn't slow down, it's likely the impact of tracing code went up instead.

    Reacted by Shantanu, Einar Forselv, Michael Droettboom and Tyler Yep
  6. Fidget-Spinner commented on Jul 14, 2022

    @Fidget-Spinner
    Fidget-Spinner
    on Jul 14, 2022
    MemberAuthor
    More actions

    This was mostly fixed in #93516. The next release (3.11b4) will have all the fixes included.

    3.10 profiler.py
    Time Elapsed: 2.1907681000002412
    
    3.11b4 profiler.py
    Time Elapsed: 2.4747707999995328
    
  7. Fidget-Spinner
    closed this as completedon Jul 14, 2022
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

    performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement

    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.