Skip to content
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

PEP440 performance improvement #27320

Merged
merged 2 commits into from
Dec 18, 2024
Merged

PEP440 performance improvement #27320

merged 2 commits into from
Dec 18, 2024

Conversation

Dwordcito
Copy link
Member

@Dwordcito Dwordcito commented Dec 17, 2024

Related issue
Closes #27308

This PR aims to improve the PEP440 version parsing by replacing regex usage with a more efficient helper function static std::vector<uint32_t> splitToNumbers(const std::string& str, const char delimiter). This change enhances performance and simplifies the implementation by directly splitting the version string into numeric components.

@Dwordcito Dwordcito linked an issue Dec 17, 2024 that may be closed by this pull request
2 tasks
@Dwordcito Dwordcito force-pushed the bug/27308-pep440-performance branch from 83a9d31 to fabc89c Compare December 17, 2024 02:57
@sebasfalcone sebasfalcone self-requested a review December 17, 2024 12:00
@GabrielEValenzuela
Copy link
Member

GabrielEValenzuela commented Dec 17, 2024

Testing 🟢

We conducted a baseline stress test on the dev/4.10.0-stress-test branch and compared it against the test results with the proposed changes, using Tracy for profiling.

The comparison of both profiling outputs shows a significant performance improvement

🍋 It's the baseline output (🟨 graphs)
♦️ It's the change output (🟥 graphs)

processEvent zone

image

VersionMatch zone

image

Compare zone

image

The information used in this comparison, can be found here

@Dwordcito Dwordcito self-assigned this Dec 18, 2024
Copy link
Member

@GabrielEValenzuela GabrielEValenzuela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Testing 🟢

@Dwordcito Dwordcito merged commit a277c27 into 4.10.0 Dec 18, 2024
38 of 39 checks passed
@Dwordcito Dwordcito deleted the bug/27308-pep440-performance branch December 18, 2024 02:08
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.

Vulnerability Scanner - Performance improvement - PEP440 version matcher
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy