Coder Social home page Coder Social logo

Comments (13)

bbhtt avatar bbhtt commented on June 17, 2024

Can you explain what you mean?

Screenshots from the metainfo file are mirrored by flatpak-builder when building the Flatpak and saved into share/app-info/media directory by appstreamcli. This is done to have a local cache of the images and to preserve privacy so that you don't need to connect to random webservers to download images.

I don't see any issue in this? Most screenshots are only a few kilobytes.

from flathub.

mrbid avatar mrbid commented on June 17, 2024

They are pretty big (2.2M) Why is it good? When I want to download an app I have internet, the screenshots are taken from the Internet. When I have the app, I don't care about screenshots.

Can you give us more information about the app in question? 2.2 MB is not crazy big but it does sound like a lot for just a few screenshots.

I would like to see if maybe they have a lot of screenshots or if there is only a few but the compression is bad?

If it's the compression being bad maybe that is an issue that could be addressed.

If there are too many screenshots, maybe a limit could be introduced or if a limit on the number of screenshots already exists it could be reduced possibly?

Either way please provide more information and examples about the apps you are referring to please! ty

from flathub.

soyersoyer avatar soyersoyer commented on June 17, 2024

This is done to have a local cache of the images and to preserve privacy so that you don't need to connect to random webservers to download images.

Does it download all of the screenshots from all of the applications? Or when and how does it preserve the privacy?

A few months ago my application (hu.irl.cameractrls) on flathub was 600 kB, and I think that's a good size for such an application. Now it's 2.7 MB. The app doesn't use the screenshots. And I can see the screenshots in the software app even if the app is not installed.

from flathub.

bbhtt avatar bbhtt commented on June 17, 2024

Does it download all of the screenshots from all of the applications?

When the build is done on Flathub servers, appstreamcli downloads the images, converts it to thumbnail and original variants and saves it. This is shipped in every Flatpak.

Or when and how does it preserve the privacy?

a) Screenshots are mirrored to Flathub's CDN, so whenever you open an app in GNOME Software/Discover, it doesn't connect to a random website which may or may not be evil

b) It is also saved to the local cache for exactly the same reason.

And I can see the screenshots in the software app even if the app is not installed.

Those are fetched from Flathub directly when not installed.

The app doesn't use the screenshots.

What do you mean? I see a bunch of screenshots here https://flathub.org/apps/hu.irl.cameractrls

A few months ago my application (hu.irl.cameractrls) on flathub was 600 kB, and I think that's a good size for such an application. Now it's 2.7 MB

So are you saying the size increased due to screenshots? Download and install size can increases for a number of reasons.

from flathub.

mrbid avatar mrbid commented on June 17, 2024

The app doesn't use the screenshots.

What do you mean? I see a bunch of screenshots here https://flathub.org/apps/hu.irl.cameractrls

He means that his app doesn't use them aka require them to operate, so there's no need for them to be packaged with his app download in his opinion - as he theorizes it might be the reason his 600 KB app jumped to 2.7 MB

So the question now is when did FlatHub start packaging images into the downloads for apps? This way the user can correlate if this is the reason.

Also @soyersoyer did you check the size of the screenshots in the downloaded app? do the size of them match up with the increased download size of your app? 600 KB to 2.7MB (+2.1 MB) ?

https://flathub.org/apps/hu.irl.cameractrls

Hm only 6 images, are you sure they are 2.1 MB total? I thought flathub was compressing user images before caching them on the CDN etc, maybe not.

All your images only add up to 730 KB.
image

So that doesn't fully explain a 2.1 MB increase in your downloaded app.

from flathub.

bbhtt avatar bbhtt commented on June 17, 2024

Each image is converted into 4 thumnails:

tree ~/.local/share/flatpak/app/hu.irl.cameractrls/current/active/files/share/app-info/media/hu/irl/cameractrls/f1e3c4bb469678af77c738d1d15f6786/screenshots

├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── image-1_orig.png
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── image-2_orig.png
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── image-3_orig.png
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── image-4_orig.png
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── image-5_orig.png
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── image-6_orig.png

1 directory, 30 files

from flathub.

bbhtt avatar bbhtt commented on June 17, 2024

This is not an issue, it is just how things work with appstream.

from flathub.

mrbid avatar mrbid commented on June 17, 2024

Each image is converted into 4 thumnails:

tree ~/.local/share/flatpak/app/hu.irl.cameractrls/current/active/files/share/app-info/media/hu/irl/cameractrls/f1e3c4bb469678af77c738d1d15f6786/screenshots

├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── image-1_orig.png
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── image-2_orig.png
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── image-3_orig.png
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── image-4_orig.png
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── image-5_orig.png
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── image-6_orig.png

1 directory, 30 files

I figured that might have been the case

from flathub.

soyersoyer avatar soyersoyer commented on June 17, 2024

But did appstream work differently last year?

from flathub.

bbhtt avatar bbhtt commented on June 17, 2024

But did appstream work differently last year?

Yes we switched from deprecated appstream-glib to libappstream https://docs.flathub.org/blog/improved-build-validation

from flathub.

soyersoyer avatar soyersoyer commented on June 17, 2024

I reduced the number of screenshots to 1, so its under 1MB again! :)

from flathub.

razzeee avatar razzeee commented on June 17, 2024

If you think this should work differently, raise it here https://github.com/ximion/appstream/issues

from flathub.

soyersoyer avatar soyersoyer commented on June 17, 2024

I am a bit tired, maybe next week.
It's a lot of excess data. 5 000 000 download / day * 1 MB unnecessary data / download = 5 TB unnecessary data / day ~ 150TB /month, and this is not only network traffic but also storage space on the user side.

from flathub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.