FFImageLoading icon indicating copy to clipboard operation
FFImageLoading copied to clipboard

change copytoasync default buffer size to match .net 4.5

Open david-pershouse opened this issue 10 years ago • 7 comments

MS changed the default buffer size in 4.5 claiming improved performance. Maybe we should do the same: https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/IO/Stream.cs#L48

david-pershouse avatar Dec 21 '15 06:12 david-pershouse

I wonder if we can find the large object heap threshold used on Xam.iOS and Xam.Android. I will ask our Xamarin key account.

molinch avatar Dec 21 '15 06:12 molinch

We should test it out. https://github.com/molinch/FFImageLoading/commit/ac3010fbac97798aee278a070b9ae6e20ad4702d

daniel-luberda avatar Dec 21 '15 13:12 daniel-luberda

I would rather have Xamarin answer on this topic than just committing .NET stuff. This kind of change can improve performance but create more OOMs.

molinch avatar Dec 21 '15 13:12 molinch

We could easily revert it. I'm doing some tests now to see if it changes anything. Please, let me know if you get any response from Xamarin.

daniel-luberda avatar Dec 21 '15 13:12 daniel-luberda

BTW:

SGen considers any objects using more than than 8,000 bytes to be large objects (SGEN_MAX_SMALL_OBJ_SIZE). Large objects are not actually allocated on the nursery, instead they are tracked by the Large Object Space (LOS) manager.

daniel-luberda avatar Dec 21 '15 14:12 daniel-luberda

Reverted it.

daniel-luberda avatar Dec 21 '15 14:12 daniel-luberda

@daniel-luberda @david-pershouse Xamarin confirmed me that the large object heap threshold is 8K. Hence I don't think we should change anything

molinch avatar Dec 26 '15 19:12 molinch