-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: optimized performances on player profiles parsing #210
Conversation
Reviewer's Guide by SourceryThis PR implements performance optimizations for player profiles parsing by reducing unnecessary HTML parsing, introducing filters caching, and optimizing BeautifulSoup queries. The changes also add request profiling capabilities for debugging purposes. Updated class diagram for PlayerCareerParserclassDiagram
class PlayerCareerParser {
+dict filters
+__init__(**kwargs)
+_init_filters(**kwargs)
+filter_request_using_query(**_)
+_filter_stats()
+_filter_all_stats_data()
+parse_data()
+__get_summary()
+get_stats()
+__get_platform_stats(platform, platform_class)
+__get_gamemode_infos(statistics_section, gamemode)
+__get_heroes_comparisons(top_heroes_section)
+__get_career_stats(career_stats_section)
}
class BasePlayerParser {
<<abstract>>
}
PlayerCareerParser --|> BasePlayerParser
Updated class diagram for PlayerCareerStatsParserclassDiagram
class PlayerCareerStatsParser {
+filter_request_using_query(**_)
+parse_data()
}
class PlayerCareerParser {
<<abstract>>
}
PlayerCareerStatsParser --|> PlayerCareerParser
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @TeKrop - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟡 Security: 1 issue found
- 🟡 Testing: 1 issue found
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
a3e5de2
to
32d8e71
Compare
Quality Gate passedIssues Measures |
Summary by Sourcery
Optimize player profile parsing by using initialized filters and introduce a profiling feature with pyinstrument for debugging.
New Features:
Enhancements:
Build:
Tests:
Before
After