-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[dotnet] Trim away CDP when publishing AOT apps #15217
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
{ | ||
get { return this.network; } | ||
} | ||
internal INetwork Network => this.network ??= new NetworkManager(this); |
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.
NetworkManager
captures IDevTools.GetDevToolsSession
in the constructor, which pulls in many CDP types.
We do not want to touch NetworkManager
unless user calls driver.Network
.
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Motivation and Context
Sample app:
Size before PR: 9.0 MB
Size after PR: 6.7 MB
Size savings: 2.3 MB
![image](https://private-user-images.githubusercontent.com/12619902/408839660-ec8f6bf8-5e39-4d47-9079-0204b5f5c09f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MzY1NDksIm5iZiI6MTczOTYzNjI0OSwicGF0aCI6Ii8xMjYxOTkwMi80MDg4Mzk2NjAtZWM4ZjZiZjgtNWUzOS00ZDQ3LTkwNzktMDIwNGI1ZjVjMDlmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE2MTcyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZjM2RlMDc4NTExNWM5ZjZmMjA0OTk2Y2UzYjBjYTg1ODFiZmIwZTUyZDA0Nzg2YjNiODJiZjM5ZTNlYTkyMDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.zK8RrfM7JQRLwdt8Aws9uW1mU3TyEsP7SrLP_B_fnTo)
Types of changes
Checklist
PR Type
Enhancement
Description
Optimized the
WebDriver
class to reduce application size.Deferred initialization of
NetworkManager
to save resources.Removed unused or redundant code for cleaner implementation.
Changes walkthrough 📝
WebDriver.cs
Optimize and streamline `WebDriver` initialization
dotnet/src/webdriver/WebDriver.cs
NetworkManager
.NetworkManager
initialization using a null-coalescingassignment.
Network
property setter.