Material.Avalonia icon indicating copy to clipboard operation
Material.Avalonia copied to clipboard

Material.Icons dll is so huge (5,7Mo)

Open flarive opened this issue 3 years ago • 6 comments

Hi,

You're using a dependency to Material.Icons from this repo : https://github.com/SKProCH/Material.Icons/

This external material icons lib by SKPoCH is great (thousands of icons) but in a end project we often use only a few icons. In your Avalonia.Material you also only use a very few of them.

I try to reduce the size of the binaries of my .net 6 Avalonia app (size on the disk but also size in memory when the app is instanciated).

The Material.Icons.dll is so huge (5,7Mo for the 1.0.8 version and 6,5Mo for latest one). If i comment all the icons I don't use in SKPoCH code, the dll is only 18Ko.

I try to replace the big dll with my reduced one i compiled myself but because of the deps.json file and the dependencies sha12 inside, i can't just switch the 5,7Mo Material.Icons.dll with my 18Ko one. (The app don't lauch because of the bad sha12 in deps.json)

Would you have an idea on how to solve that ? May be by removing this lib from your dependencies and by having just the few icons xaml you need in your resources file.

Memory footprit and green software is so important in 2021...

Thanks a lot

Eviral

flarive avatar Dec 05 '21 13:12 flarive

I created an Internal Icon view and integrated some icons to internal icons data set. All those changes are in this commit.

Integration are almost complete, but there something are trying to block our way. Maybe this function is still used by other project that I cant tell, so I set this function as obsoleted and I want to remove it later.

To use an alternative way of creating FABs in code-behind, FloatingButtonBuilder will be handy on this case. I will commit fixes, if I find any glitches of this builder.

appleneko2001 avatar Dec 15 '21 12:12 appleneko2001

Thanks a lot ! I'm going to try :)

Please tell me when your integration is 100% finished...

flarive avatar Dec 20 '21 13:12 flarive

Hi @flarive I have completed the integration of this. You can get update from nightly source. For now I just need update wiki (Add entry about FloatingButtonBuilder).

appleneko2001 avatar Dec 21 '21 07:12 appleneko2001

Hi @appleneko2001,

I have tried the latest nightly build 2.5.0.40 but i have an exception here :

ex1

Here is my context :

ex2 ex3

Thanks for your help :)

flarive avatar Dec 22 '21 07:12 flarive

There I miss one. I have removed the Material.Icons.Avalonia reference in index file. Update your nightly package to look changes for now.

appleneko2001 avatar Dec 26 '21 11:12 appleneko2001

Works very well now ! Thanks a lot

flarive avatar Jan 03 '22 07:01 flarive

Fixed in 3.0.0-avalonia10-preview1

SKProCH avatar Sep 27 '22 08:09 SKProCH