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

PictureBox to use HttpClient instead of using WebRequest #1756

Closed
RussKie opened this issue Sep 4, 2019 · 4 comments · Fixed by #6684
Closed

PictureBox to use HttpClient instead of using WebRequest #1756

RussKie opened this issue Sep 4, 2019 · 4 comments · Fixed by #6684
Labels
code cleanup cleanup code for unused apis/properties/comments - no functional changes. good first issue Issue should be easy to implement, good for first-time contributors help wanted Good issue for external contributors tenet-performance Improve performance, flag performance regressions across core releases

Comments

@RussKie
Copy link
Member

RussKie commented Sep 4, 2019

  • .NET Core Version: 3.0

Problem description:

PictureBox uses an instance of WebRequest to load images.
It needs to be replaces with a cached instance of HttpClient as suggest in #1696 (comment)

Expected behavior:

Minimal repro:

https://github.com/dotnet/winforms/blob/release/3.0/src/System.Windows.Forms/src/System/Windows/Forms/PictureBox.cs#L558-L564

@RussKie RussKie added help wanted Good issue for external contributors good first issue Issue should be easy to implement, good for first-time contributors tenet-performance Improve performance, flag performance regressions across core releases code cleanup cleanup code for unused apis/properties/comments - no functional changes. labels Sep 4, 2019
@RussKie RussKie added this to the 5.0 milestone Sep 4, 2019
@ghost ghost added the 🚧 work in progress Work that is current in progress label Sep 22, 2019
@ghost ghost removed the 🚧 work in progress Work that is current in progress label Oct 1, 2019
@flerka
Copy link

flerka commented Oct 16, 2019

@neldridg @RussKie is it still available? May I take it?

@RussKie
Copy link
Member Author

RussKie commented Oct 16, 2019

@flerka it is still up for grabs, so you're welcome to have a go at it.
You may find discussions in #1952 useful.
Thank you

@ghost ghost added the 🚧 work in progress Work that is current in progress label Oct 18, 2019
@ghost ghost removed the 🚧 work in progress Work that is current in progress label Feb 14, 2020
@RussKie RussKie modified the milestones: 5.0 Previews 1-4, 5.0 Apr 20, 2020
@merriemcgaw merriemcgaw modified the milestones: 5.0, Future Sep 1, 2020
@kant2002
Copy link
Contributor

@RussKie I see value for ILLink/NativeAOT scenario to be able to disable reading data from the web streams. I agree that this feature allow load data from URLs but this feature bring additional dependency which may be not wanted. Is it possible to put this feature (loading images from remote addresses) behind AppContext switche similar to how it is proposed here dotnet/aspnetcore#31561 (comment)
I hope that allow to have WinForms to be more pay for play

@RussKie
Copy link
Member Author

RussKie commented May 19, 2021

Is it possible to put this feature (loading images from remote addresses) behind AppContext switche similar to how it is proposed here dotnet/aspnetcore#31561 (comment)

We can certainly consider this.
If you have any deeper thoughts on this subject and proposals - please feel free to share. We also accept pull requests ;)

@ghost ghost added 🚧 work in progress Work that is current in progress and removed 🚧 work in progress Work that is current in progress labels Feb 12, 2022
@ghost ghost removed this from the Future milestone Mar 10, 2022
@ghost ghost removed the 🚧 work in progress Work that is current in progress label Mar 10, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
code cleanup cleanup code for unused apis/properties/comments - no functional changes. good first issue Issue should be easy to implement, good for first-time contributors help wanted Good issue for external contributors tenet-performance Improve performance, flag performance regressions across core releases
Projects
None yet
5 participants
@kant2002 @RussKie @flerka @merriemcgaw and others